timeout(1) on Solnix vs Linux and the BSDs
timeout is not in the Solnix base system. Install pkgs.solnix.coreutils to get GNU coreutils timeout, which is the same program as on Linux. The BSD versions differ in -f meaning, exit statuses, signal handling and option syntax.
The manual pages
- Solnix: timeout(1) from
pkgs.solnix.coreutils - Linux: timeout(1) coreutils-full-9.11
- FreeBSD: timeout(1) 15.1-RELEASE
- OpenBSD: timeout(1) 8.0
- NetBSD: timeout(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
timeout
What Solnix runs
Not installed by default: add pkgs.solnix.coreutils. The published page is the GNU coreutils 9.7 timeout page. The bundle lists no other illumos variant and no illumos timeout on the default PATH.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same program | The Solnix page and the Linux page describe GNU coreutils timeout with the same options (-f, -k, -p, -s, -v, --help, --version), the same DURATION syntax and the same exit statuses 124, 125, 126, 127 and 137.Source: Solnix timeout(1) DESCRIPTION, Exit status; Linux timeout(1) DESCRIPTION, Exit status |
| FreeBSD, OpenBSD, NetBSD | -f/--foreground meaning | GNU text says --foreground lets COMMAND read from the TTY and get TTY signals, and that children of COMMAND are not timed out. FreeBSD says it times out only the command and does not propagate signals to descendants. OpenBSD and NetBSD say the timeout is not propagated to children.Source: Solnix timeout(1) -f; FreeBSD timeout(1) -f; OpenBSD timeout(1) -f; NetBSD timeout(1) -f |
| FreeBSD | reaper and background children | Without --foreground, FreeBSD timeout acts as reaper of the command and its descendants and waits for all of them. Background descendants ignore SIGINT and SIGQUIT, so with -s INT the example takes 4 seconds, not 2. The GNU page does not describe this.Source: FreeBSD timeout(1) IMPLEMENTATION NOTES; Solnix timeout(1) DESCRIPTION |
| FreeBSD | signals sent to timeout itself | FreeBSD timeout treats SIGALRM as a timeout and forwards other signals to the command, except SIGKILL and SIGSTOP. The Solnix page does not document how timeout handles signals it receives. Source: FreeBSD timeout(1) DESCRIPTION; Solnix timeout(1) DESCRIPTION |
| OpenBSD, NetBSD | exit status 125 | The Solnix page documents 125 when timeout itself fails. The OpenBSD and NetBSD EXIT STATUS sections do not list 125. FreeBSD documents 125 for errors such as an invalid duration or signal. Source: Solnix timeout(1) Exit status; OpenBSD timeout(1) EXIT STATUS; NetBSD timeout(1) EXIT STATUS; FreeBSD timeout(1) EXIT STATUS |
| OpenBSD, NetBSD | 126, 127 and 137 documented | NetBSD lists only 124 and says a command killed by a signal gives the signal number plus 128. It does not list 126 or 127. OpenBSD lists 124, 126 and 127 but not 137. Solnix lists 124 to 127 and 137 (128+9). Source: Solnix timeout(1) Exit status; NetBSD timeout(1) EXIT STATUS; OpenBSD timeout(1) EXIT STATUS |
| FreeBSD, OpenBSD, NetBSD | long option argument syntax | GNU lists --kill-after=DURATION and --signal=SIGNAL with an equals sign. The OpenBSD page also uses =. The FreeBSD and NetBSD pages show a space (--kill-after time, --signal signal). Whether the other form is accepted is not stated.Source: Solnix timeout(1) -k, -s; OpenBSD timeout(1) -k, -s; FreeBSD timeout(1) -k, -s; NetBSD timeout(1) -k, -s |
| OpenBSD, NetBSD | -v and --help/--version missing | Solnix and Linux have -v/--verbose, --help and --version. FreeBSD has -v. The OpenBSD and NetBSD pages document no -v.Source: Solnix timeout(1) -v, --help, --version; FreeBSD timeout(1) -v; OpenBSD timeout(1) SYNOPSIS; NetBSD timeout(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | duration suffixes | Solnix says DURATION is a floating point number with suffix s, m, h or d, and that 0 disables the timeout. FreeBSD documents the same suffixes. The OpenBSD and NetBSD pages document no suffixes. OpenBSD says 0 disables the timeout. Source: Solnix timeout(1) DESCRIPTION; FreeBSD timeout(1) Duration Format; OpenBSD timeout(1) DESCRIPTION; NetBSD timeout(1) DESCRIPTION |
Standards
- POSIX: timeout is a POSIX.1-2024 utility.
- Solnix: The Solnix page has no STANDARDS section.
- FreeBSD: The timeout utility is expected to conform to the specification. The
-voption and long option names are extensions to that specification. - OpenBSD: The timeout utility is compliant with the specification.
- NetBSD: The NetBSD page has no STANDARDS section.
Writing portable scripts
- Use only
-f,-k,-pand-swith the short form and a space before the argument. Do not rely on-v, which OpenBSD and NetBSD do not document. - Test for 124 for a timeout, but do not rely on 125 or 137 on the BSDs. Use plain seconds for DURATION, since suffixes are not documented on OpenBSD or NetBSD.
- Do not rely on
-fto affect child processes the same way everywhere. Its documented meaning differs between GNU, FreeBSD and OpenBSD/NetBSD.
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.