Sat Aug 2 06:20:56 2014 UTC ()
Punctuation, markup, whitespace improvements.


(wiz)
diff -r1.2 -r1.3 src/usr.bin/timeout/timeout.1

cvs diff -r1.2 -r1.3 src/usr.bin/timeout/timeout.1 (expand / switch to unified diff)

--- src/usr.bin/timeout/timeout.1 2014/08/01 14:01:30 1.2
+++ src/usr.bin/timeout/timeout.1 2014/08/02 06:20:56 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: timeout.1,v 1.2 2014/08/01 14:01:30 christos Exp $ 1.\" $NetBSD: timeout.1,v 1.3 2014/08/02 06:20:56 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org> 3.\" Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org>
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -24,62 +24,62 @@ @@ -24,62 +24,62 @@
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE. 25.\" SUCH DAMAGE.
26.\" 26.\"
27.\" $FreeBSD: head/usr.bin/timeout/timeout.1 268861 2014-07-18 22:56:59Z bapt $ 27.\" $FreeBSD: head/usr.bin/timeout/timeout.1 268861 2014-07-18 22:56:59Z bapt $
28.\" 28.\"
29.Dd July 19, 2014 29.Dd July 19, 2014
30.Dt TIMEOUT 1 30.Dt TIMEOUT 1
31.Os 31.Os
32.Sh NAME 32.Sh NAME
33.Nm timeout 33.Nm timeout
34.Nd run a command with a time limit 34.Nd run a command with a time limit
35.Sh SYNOPSIS 35.Sh SYNOPSIS
36.Nm 36.Nm
37.Op Fl -signal Ar sig | Fl s Ar sig 37.Op Fl Fl signal Ar sig | Fl s Ar sig
38.Op Fl -preserve-status 38.Op Fl Fl preserve-status
39.Op Fl -kill-after Ar time | Fl k Ar time 39.Op Fl Fl kill-after Ar time | Fl k Ar time
40.Op Fl -foreground 40.Op Fl Fl foreground
41.Ao Ar duration Ac 41.Ao Ar duration Ac
42.Ao Ar command Ac 42.Ao Ar command Ac
43.Ao Ar args ... Ac 43.Ao Ar args ... Ac
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45.Nm 45.Nm
46starts the 46starts the
47.Ar command 47.Ar command
48with its 48with its
49.Ar args. 49.Ar args .
50If 50If
51.Ar command 51.Ar command
52is still running after 52is still running after
53.Ar duration , 53.Ar duration ,
54it is killed. 54it is killed.
55By default, 55By default,
56.Ar SIGTERM. 56.Dv SIGTERM .
57is sent. 57is sent.
58.Bl -tag -width "-k time, --kill-after time" 58.Bl -tag -width "-k time, --kill-after time"
59.It Fl -preserve-status 59.It Fl Fl preserve-status
60Always exits with the same status as 60Always exits with the same status as
61.Ar command 61.Ar command
62even if it times out. 62even if it times out.
63.It Fl -foreground 63.It Fl Fl foreground
64Do not propagate timeout to the 64Do not propagate timeout to the
65.Ar command 65.Ar command
66children. 66children.
67.It Fl s Ar sig , Fl -signal Ar sig 67.It Fl s Ar sig , Fl Fl signal Ar sig
68Specify the signal to send on timeout. 68Specify the signal to send on timeout.
69By default, 69By default,
70.Ar SIGTERM . 70.Dv SIGTERM .
71is sent. 71is sent.
72.It Fl k Ar time , Fl -kill-after Ar time 72.It Fl k Ar time , Fl Fl kill-after Ar time
73Send a second kill signal if 73Send a second kill signal if
74.Ar command 74.Ar command
75is still running after 75is still running after
76.Ar time 76.Ar time
77after the first signal was sent. 77after the first signal was sent.
78.El 78.El
79.Sh DURATION FORMAT 79.Sh DURATION FORMAT
80.Ar duration 80.Ar duration
81and 81and
82.Ar time 82.Ar time
83can be integer or decimal numbers. 83can be integer or decimal numbers.
84Values without unit symbols are interpreted as seconds. 84Values without unit symbols are interpreted as seconds.
85.Pp 85.Pp
@@ -90,41 +90,44 @@ seconds @@ -90,41 +90,44 @@ seconds
90.It m 90.It m
91minutes 91minutes
92.It h 92.It h
93hours 93hours
94.It d 94.It d
95days 95days
96.El 96.El
97.Sh EXIT STATUS 97.Sh EXIT STATUS
98If the timeout was not reached, the exit status of 98If the timeout was not reached, the exit status of
99.Ar command 99.Ar command
100is returned. 100is returned.
101.Pp 101.Pp
102If the timeout was reached and 102If the timeout was reached and
103.Fl -preserve-status 103.Fl Fl preserve-status
104is set, the exit status of 104is set, the exit status of
105.Ar command 105.Ar command
106is returned. 106is returned.
107If 107If
108.Fl -preserve-status 108.Fl Fl preserve-status
109is not set, an exit status of 124 is returned. 109is not set, an exit status of 124 is returned.
110.Pp 110.Pp
111If 111If
112.Ar command 112.Ar command
113exits after receiving a signal, the exit status returned is the signal number plus 128. 113exits after receiving a signal, the exit status returned is the signal number plus 128.
114.Sh SEE ALSO 114.Sh SEE ALSO
115.Xr kill 1 , 115.Xr kill 1 ,
116.Xr signal 3 116.Xr signal 3
117.Sh HISTORY 117.Sh HISTORY
118A 118A
119.Nm 119.Nm
120utility appeared in a development branch of 120utility appeared in a development branch of
121.Fx 11 121.Fx 11
122and was imported into 122and was imported into
123.Nx 7 . 123.Nx 7 .
124The 124The
125.Fx 125.Fx
126work is compatible with GNU 126work is compatible with GNU
127.Xr timeout 1 127.Nm
128by Padraig Brady, from GNU Coreutils 8.21. The 128by
129.Xr timeout 1 129.An Padraig Brady ,
 130from GNU Coreutils 8.21.
 131The
 132.Nm
130utility first appeared in GNU Coreutils 7.0. 133utility first appeared in GNU Coreutils 7.0.