Skip to content

sleep inf isn't documented #119

Description

@Paebbels

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions