sleep(1) on Solnix vs Linux and the BSDs
On Solnix, sleep is the illumos /usr/bin/sleep. It accepts one time operand with an optional single suffix (s, m, h, d, w, y), including w and y, which no counterpart page lists. Unlike Linux and FreeBSD, it takes only one operand and does not add several intervals together.
The manual pages
- Solnix: sleep(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: sleep(1) coreutils-full-9.11
- FreeBSD: sleep(1) 15.1-RELEASE
- OpenBSD: sleep(1) 8.0
- NetBSD: sleep(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
sleep
What Solnix runs
A default Solnix system runs the illumos sleep at /usr/bin/sleep. No other variants are shipped. The Solnix page says suffix use is generally not portable to other systems.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD | multiple operands | Linux and FreeBSD sleep accept several intervals and pause for their sum. The Solnix synopsis shows a single time[suffix] operand and the page does not describe summing, so 'sleep 1m 30s' is not documented to work. Source: Solnix sleep(1) SYNOPSIS; Linux sleep(1) SYNOPSIS, DESCRIPTION; FreeBSD sleep(1) SYNOPSIS, DESCRIPTION |
| Linux, FreeBSD | w and y suffixes | Solnix accepts the suffixes w (weeks) and y (years) as well as s, m, h and d. Linux and FreeBSD list only s, m, h and d. Source: Solnix sleep(1) DESCRIPTION (suffix list); Linux sleep(1) DESCRIPTION; FreeBSD sleep(1) DESCRIPTION |
| OpenBSD, NetBSD | suffixes not supported | OpenBSD and NetBSD document only a seconds operand and no unit suffixes. A script using 'sleep 5m' or 'sleep 2h' written for Solnix is not documented to work there. Source: OpenBSD sleep(1) SYNOPSIS; NetBSD sleep(1) SYNOPSIS; Solnix sleep(1) DESCRIPTION |
| FreeBSD, OpenBSD, NetBSD | hexadecimal and infinity operands | Solnix says the operand may be decimal or hexadecimal, and that Inf or infinity are honored. FreeBSD says intervals may use any form allowed by strtod(3). OpenBSD requires a non-negative decimal value. The NetBSD page mentions only integer and fractional seconds. Source: Solnix sleep(1) DESCRIPTION; FreeBSD sleep(1) DESCRIPTION; OpenBSD sleep(1) DESCRIPTION; NetBSD sleep(1) DESCRIPTION |
| FreeBSD | SIGALRM | On Solnix, SIGALRM ends the sleep and sleep exits 0. FreeBSD does not handle SIGALRM specially, so it takes the standard action. Source: Solnix sleep(1) DESCRIPTION, EXIT STATUS; FreeBSD sleep(1) IMPLEMENTATION NOTES |
| Linux, OpenBSD | SIGALRM | The Solnix page documents SIGALRM as ending the sleep with status 0. The Linux and OpenBSD pages do not mention SIGALRM. Source: Solnix sleep(1) DESCRIPTION, EXIT STATUS; Linux sleep(1); OpenBSD sleep(1) |
| NetBSD | SIGALRM | Solnix and NetBSD both exit 0 when SIGALRM is received. Source: Solnix sleep(1) EXIT STATUS; NetBSD sleep(1) EXIT STATUS |
| FreeBSD, NetBSD | SIGINFO | FreeBSD and NetBSD print an estimate of the seconds left to sleep on standard output when SIGINFO arrives. The Solnix page documents no SIGINFO behaviour. Source: FreeBSD sleep(1) DESCRIPTION; NetBSD sleep(1) DESCRIPTION; Solnix sleep(1) Signals |
| Linux | options | Linux sleep documents --help and --version. The Solnix synopsis has no options.Source: Linux sleep(1) SYNOPSIS, DESCRIPTION; Solnix sleep(1) SYNOPSIS |
| NetBSD | long sleeps | NetBSD ignores fractional seconds for requests of much more than about 2.5 hours, and fails on durations beyond about 250 billion years. The Solnix page documents no such limits. Source: NetBSD sleep(1) DESCRIPTION, BUGS; Solnix sleep(1) DESCRIPTION |
| FreeBSD | zero or negative total | FreeBSD sleep exits immediately if the final sum is zero or negative. The Solnix page says the operand is a non-negative number and does not say what happens otherwise. Source: FreeBSD sleep(1) DESCRIPTION; Solnix sleep(1) DESCRIPTION |
Standards
- POSIX: sleep is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed.
- FreeBSD: Expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. Non-integer intervals, units other than seconds and multiple intervals are non-portable extensions first introduced in GNU sh-utils 2.0a.
- OpenBSD: Compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. Support for fractional seconds is an extension.
- NetBSD: Expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. Non-integral delays are a non-portable extension.
Writing portable scripts
- Pass a plain integer number of seconds, with no suffix, fraction or hex. That is the only form all five pages document.
- Do not rely on several operands being summed or on suffixes such as m, h, w or y. For longer waits, give the total in seconds, for example sleep 90 instead of sleep 1m 30s.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.