diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2017-03-22 17:53:25 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2017-03-22 17:53:25 +0000 |
commit | 6f1e2c1745b78711f7687843e16b2647dc7c7545 (patch) | |
tree | 92709a338c2405c6ba6e8424800d6ab70abba64b /bin/pwait/pwait.1 | |
parent | 9bbcb4a042df2ed01fc31c024908ca24ca9c3d9f (diff) | |
download | FreeBSD-src-6f1e2c1745b78711f7687843e16b2647dc7c7545.zip FreeBSD-src-6f1e2c1745b78711f7687843e16b2647dc7c7545.tar.gz |
MFC r314886,r314943,r314944:
r314886:
pwait: Add a -t flag to specify a timeout before exiting, and tests.
r314943:
Remove unneeded -x from tests.
r314944:
Rename some tests to end in _test.
Diffstat (limited to 'bin/pwait/pwait.1')
-rw-r--r-- | bin/pwait/pwait.1 | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/bin/pwait/pwait.1 b/bin/pwait/pwait.1 index c5fbb53..b317000 100644 --- a/bin/pwait/pwait.1 +++ b/bin/pwait/pwait.1 @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2009 +.Dd March 7, 2017 .Dt PWAIT 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd wait for processes to terminate .Sh SYNOPSIS .Nm +.Op Fl t Ar duration .Op Fl v .Ar pid \&... @@ -50,13 +51,36 @@ utility will wait until each of the given processes has terminated. .Pp The following option is available: .Bl -tag -width indent +.It Fl t Ar duration +If any process is still running after +.Ar duration , +.Nm +will exit. +The +.Ar duration +value 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 +.El .It Fl v Print the exit status when each process terminates. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS The .Nm -utility returns 0 on success, and >0 if an error occurs. +utility exits 0 on success, and >0 if an error occurs. +.Pp +If the +.Fl t +flag is specified and a timeout occurs, the exit status will be 124. .Pp Invalid pids elicit a warning message but are otherwise ignored. .Sh SEE ALSO |