- NetBSD Manual Pages
TIMEOUT(1) NetBSD General Commands Manual TIMEOUT(1)
Powered by man-cgi (2021-03-02).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
timeout -- run a command with a time limit
timeout [--signal sig | -s sig] [--preserve-status]
[--kill-after time | -k time] [--foreground] <duration> <command>
timeout starts the command with its args. If command is still running
after duration, it is killed. By default, SIGTERM is sent.
--preserve-status Always exits with the same status as command
even if it times out.
--foreground Do not propagate timeout to the command chil-
-s sig, --signal sig Specify the signal to send on timeout. By
default, SIGTERM is sent.
-k time, --kill-after time Send a second kill signal if command is still
running after time after the first signal was
duration and time can be integer or decimal numbers. Values without unit
symbols are interpreted as seconds.
Supported unit symbols are:
If the timeout was not reached, the exit status of command is returned.
If the timeout was reached and --preserve-status is set, the exit status
of command is returned. If --preserve-status is not set, an exit status
of 124 is returned.
If command exits after receiving a signal, the exit status returned is
the signal number plus 128.
A timeout utility appeared in a development branch of FreeBSD 11 and was
imported into NetBSD 7. The FreeBSD work is compatible with GNU timeout
by Padraig Brady, from GNU Coreutils 8.21. The timeout utility first
appeared in GNU Coreutils 7.0.
NetBSD 9.99 July 19, 2014 NetBSD 9.99