Date: Thu, 29 Mar 2018 02:13:58 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331720 - head/usr.bin/timeout Message-ID: <201803290213.w2T2DwPl057805@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Thu Mar 29 02:13:58 2018 New Revision: 331720 URL: https://svnweb.freebsd.org/changeset/base/331720 Log: timeout.1: Try to improve clarity Minor rewordings, markup fixes or enhancements, and some typo fixes. Add a few sentences clarifying the special zero duration. PR: 227012 Submitted by: Mateusz Piotrowski (0mp@) (earlier version) Modified: head/usr.bin/timeout/timeout.1 Modified: head/usr.bin/timeout/timeout.1 ============================================================================== --- head/usr.bin/timeout/timeout.1 Thu Mar 29 01:20:58 2018 (r331719) +++ head/usr.bin/timeout/timeout.1 Thu Mar 29 02:13:58 2018 (r331720) @@ -1,3 +1,5 @@ +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org> .\" All rights reserved. .\" @@ -24,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2017 +.Dd March 28, 2018 .Dt TIMEOUT 1 .Os .Sh NAME @@ -36,40 +38,47 @@ .Op Fl -preserve-status .Op Fl -kill-after Ar time | Fl k Ar time .Op Fl -foreground -.Ao Ar duration Ac -.Ao Ar command Ac -.Ao Ar args ... Ac +.Ar duration +.Ar command +.Op Ar args ... .Sh DESCRIPTION .Nm starts the .Ar command with its -.Ar args. -If +.Ar args . +If the .Ar command is still running after .Ar duration , it is killed. By default, -.Ar SIGTERM. +.Dv SIGTERM is sent. -.Bl -tag -width "-k time, --kill-after time" +The special +.Ar duration , +zero, signifies no limit. +Therefore a signal is never sent if +.Ar duration +is 0. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl -preserve-status -Always exits with the same status as -.Ar command -even if it times out. +Exit with the same status as +.Ar command , +even if it times out and is killed. .It Fl -foreground -Do not propagate timeout to the -.Ar command -children. +Do not propagate timeout to the children of +.Ar command . .It Fl s Ar sig , Fl -signal Ar sig Specify the signal to send on timeout. By default, -.Ar SIGTERM . +.Dv SIGTERM is sent. .It Fl k Ar time , Fl -kill-after Ar time Send a -.Ar SIGKILL +.Dv SIGKILL signal if .Ar command is still running after @@ -80,18 +89,19 @@ after the first signal was sent. .Ar duration and .Ar time -can be integer or decimal numbers. -Values without unit symbols are interpreted as seconds. +are non-negative integer or real (decimal) numbers, with an optional +unit-specifying suffix. +Values without an explicit unit are interpreted as seconds. .Pp Supported unit symbols are: .Bl -tag -width indent -compact -.It s +.It Cm s seconds -.It m +.It Cm m minutes -.It h +.It Cm h hours -.It d +.It Cm d days .El .Sh EXIT STATUS @@ -115,17 +125,17 @@ plus 128. .Pp If .Ar command -is an invalid command, the exit status returned is 126. +refers to a non-existing program, the exit status returned is 127. .Pp If .Ar command -is a non existing command, the exit status returned is 127. +is an otherwise invalid program, the exit status returned is 126. .Pp If an invalid parameter is passed to .Fl s or .Fl k , -the exit status return is 125. +the exit status returned is 125. .Sh SEE ALSO .Xr kill 1 , .Xr signal 3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803290213.w2T2DwPl057805>