Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2014 22:56:59 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268861 - head/usr.bin/timeout
Message-ID:  <201407182256.s6IMuxoK042652@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Jul 18 22:56:59 2014
New Revision: 268861
URL: http://svnweb.freebsd.org/changeset/base/268861

Log:
  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

Modified:
  head/usr.bin/timeout/timeout.1

Modified: head/usr.bin/timeout/timeout.1
==============================================================================
--- head/usr.bin/timeout/timeout.1	Fri Jul 18 22:44:15 2014	(r268860)
+++ head/usr.bin/timeout/timeout.1	Fri Jul 18 22:56:59 2014	(r268861)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407182256.s6IMuxoK042652>