File: timeout.1

package info (click to toggle)
coreutils 9.10-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 70,560 kB
  • sloc: ansic: 253,546; sh: 30,931; perl: 8,141; yacc: 1,846; makefile: 198; python: 47; sed: 16
file content (92 lines) | stat: -rw-r--r-- 3,556 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.50.1.
.TH TIMEOUT "1" "February 2026" "GNU coreutils 9.10" "User Commands"
.SH NAME
timeout \- run a command with a time limit
.SH SYNOPSIS
.B timeout
[\fI\,OPTION\/\fR]... \fI\,DURATION COMMAND \/\fR[\fI\,ARG\/\fR]...
.SH DESCRIPTION
.\" Add any additional description here
.PP
Start COMMAND, and kill it if still running after DURATION.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#timeout-f'\fB\-f, \-\-foreground\fP\X'tty: link'
when not running timeout directly from a shell prompt,
allow COMMAND to read from the TTY and get TTY signals;
in this mode, children of COMMAND will not be timed out
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#timeout-k'\fB\-k, \-\-kill\-after=\,DURATION\fP\X'tty: link'\/\fR
also send a KILL signal if COMMAND is still running
this long after the initial signal was sent
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#timeout-p'\fB\-p, \-\-preserve\-status\fP\X'tty: link'
exit with the same status as COMMAND,
even when the command times out
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#timeout-s'\fB\-s, \-\-signal=\,SIGNAL\fP\X'tty: link'\/\fR
specify the signal to be sent on timeout;
SIGNAL may be a name like 'HUP' or a number;
see 'kill \fB\-l\fR' for a list of signals
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#timeout-v'\fB\-v, \-\-verbose\fP\X'tty: link'
diagnose to standard error any signal sent upon timeout
.TP
\X'tty: link https://www.gnu.org/software/coreutils/timeout#timeout--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/timeout#timeout--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.PP
DURATION is a floating point number with an optional suffix:
\&'s' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
A duration of 0 disables the associated timeout.
.PP
Upon timeout, send the TERM signal to COMMAND, if no other SIGNAL specified.
The TERM signal kills any process that does not block or catch that signal.
It may be necessary to use the KILL signal, since this signal can't be caught.
.SS "Exit status:"
.TP
124
if COMMAND times out, and \fB\-\-preserve\-status\fR is not specified
.TP
125
if the timeout command itself fails
.TP
126
if COMMAND is found but cannot be invoked
.TP
127
if COMMAND cannot be found
.TP
137
if COMMAND (or timeout itself) is sent the KILL (9) signal (128+9)
.TP
\-
the exit status of COMMAND otherwise
.SH BUGS
Some platforms don't currently support timeouts beyond the year 2038.
.SH AUTHOR
Written by Padraig Brady.
.SH "REPORTING BUGS"
Report bugs to: bug\-coreutils@gnu.org
.br
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
.br
General help using GNU software: <https://www.gnu.org/gethelp/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBkill\fP(1)
.PP
.br
Full documentation <https://www.gnu.org/software/coreutils/timeout>
.br
or available locally via: info \(aq(coreutils) timeout invocation\(aq