diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-07-18 22:56:59 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-07-18 22:56:59 +0000 |
commit | 56793850d8d50b96996cd6e37b872f45d49d3b71 (patch) | |
tree | d3fd68748ed42e1db9d3489a9f584b4390951bd8 /usr.bin/timeout | |
parent | e6c0306561e541e2b87091ac09701a1835b5f669 (diff) | |
download | src-56793850d8d50b96996cd6e37b872f45d49d3b71.tar.gz src-56793850d8d50b96996cd6e37b872f45d49d3b71.zip |
Improve timeout(1) man page
Document the exit values and the duration format
Improve wording
Pet mandoc -Tlint
Sort SEE ALSO
Phabric: https://phabric.freebsd.org/D432
Reviewed by: wblock
Notes
Notes:
svn path=/head/; revision=268861
Diffstat (limited to 'usr.bin/timeout')
-rw-r--r-- | usr.bin/timeout/timeout.1 | 62 |
1 files changed, 53 insertions, 9 deletions
diff --git a/usr.bin/timeout/timeout.1 b/usr.bin/timeout/timeout.1 index d1b80eeb140b..028fc622380f 100644 --- a/usr.bin/timeout/timeout.1 +++ b/usr.bin/timeout/timeout.1 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2014 +.Dd July 19, 2014 .Dt TIMEOUT 1 .Os .Sh NAME @@ -44,9 +44,15 @@ starts the .Ar command with its -.Ar args -and kills if it is still runs after -.Ar duration . +.Ar args. +If +.Ar command +is still running after +.Ar duration , +it is killed. +By default, +.Ar SIGTERM. +is sent. .Bl -tag -width "-k time, --kill-after time" .It Fl -preserve-status Always exits with the same status as @@ -57,14 +63,52 @@ Do not propagate timeout to the .Ar command children. .It Fl s Ar sig , Fl -signal Ar sig -Speficy the signal to send on timeout by default +Specify the signal to send on timeout. +By default, .Ar SIGTERM . +is sent. .It Fl k Ar time , Fl -kill-after Ar time -Send a second kill if the +Send a second kill signal if .Ar command is still running after .Ar time -seconds after the first signal was sent +after the first signal was sent. +.El +.Sh DURATION FORMAT +.Ar duration +and +.Ar time +can be integer or decimal numbers. +Values without unit symbols are interpreted as seconds. +.Pp +Supported unit symbols are: +.Bl -tag -width indent -compact +.It s +seconds +.It m +minutes +.It h +hours +.It d +days +.El +.Sh EXIT STATUS +If the timeout was not reached, the exit status of +.Ar command +is returned. +.Pp +If the timeout was reached and +.Fl -preserve-status +is set, the exit status of +.Ar command +is returned. +If +.Fl -preserve-status +is not set, an exit status of 124 is returned. +.Pp +If +.Ar command +exits after receiving a signal, the exit status returned is the signal number plus 128. .Sh SEE ALSO -.Xr signal 3 , -.Xr kill 1 +.Xr kill 1 , +.Xr signal 3 |