According to Gemini, sleep supports parameter infinite.
Testing, every string starting with inf causes an infinite sleep:
sleep 1
sleep i
sleep in
sleep inf # infinite sleep
sleep infinite # infinite sleep
sleep infoobar # infinite sleep
Bug:
- Checking just the prefix
inf but not parsing and checking the full token is a bug.
Is this due to broken floating point value parsing?
When comparing against GNU coreutils, only inf is allowed. Also there it's almost undocumented:
Lets check Busybox's sleep --help command output:
/ # sleep --help
BusyBox v1.37.0 (2025-01-17 18:12:01 UTC) multi-call binary.
Usage: sleep [N]...
Pause for a time equal to the total of the args given, where each arg can
have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays
Findings:
- optional suffix isn't documented in usage.
- token
inf is not documented.
- option
--help is not documented
- support for floating point literals is not documented.
According to Gemini, sleep supports parameter
infinite.Testing, every string starting with
infcauses an infinite sleep:Bug:
infbut not parsing and checking the full token is a bug.Is this due to broken floating point value parsing?
When comparing against GNU coreutils, only
infis allowed. Also there it's almost undocumented:sleep --helpLets check Busybox's
sleep --helpcommand output:Findings:
infis not documented.--helpis not documented