]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/pwait/pwait.1
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / bin / pwait / pwait.1
1 .\"
2 .\" Copyright (c) 2004-2009, Jilles Tjoelker
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with
6 .\" or without modification, are permitted provided that the
7 .\" following conditions are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above
10 .\"    copyright notice, this list of conditions and the
11 .\"    following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the
13 .\"    above copyright notice, this list of conditions and
14 .\"    the following disclaimer in the documentation and/or
15 .\"    other materials provided with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18 .\" CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
19 .\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21 .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 .\" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
23 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30 .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 .\" OF SUCH DAMAGE.
32 .\"
33 .\" $FreeBSD$
34 .\"
35 .Dd January 26, 2020
36 .Dt PWAIT 1
37 .Os
38 .Sh NAME
39 .Nm pwait
40 .Nd wait for processes to terminate
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl t Ar duration
44 .Op Fl ov
45 .Ar pid
46 \&...
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility will wait until each of the given processes has terminated.
51 .Pp
52 The following option is available:
53 .Bl -tag -width indent
54 .It Fl o
55 Exit when any of the given processes has terminated.
56 .It Fl t Ar duration
57 If any process is still running after
58 .Ar duration ,
59 .Nm
60 will exit.
61 The
62 .Ar duration
63 value can be integer or decimal numbers.
64 Values without unit symbols are interpreted as seconds.
65 .Pp
66 Supported unit symbols are:
67 .Bl -tag -width indent -compact
68 .It s
69 seconds
70 .It m
71 minutes
72 .It h
73 hours
74 .El
75 .It Fl v
76 Print the exit status when each process terminates.
77 .El
78 .Sh EXIT STATUS
79 The
80 .Nm
81 utility exits 0 on success, and >0 if an error occurs.
82 .Pp
83 If the
84 .Fl t
85 flag is specified and a timeout occurs, the exit status will be 124.
86 .Pp
87 Invalid pids elicit a warning message but are otherwise ignored.
88 .Sh SEE ALSO
89 .Xr kill 1 ,
90 .Xr pkill 1 ,
91 .Xr ps 1 ,
92 .Xr wait 1 ,
93 .Xr kqueue 2
94 .Sh NOTES
95 .Nm
96 is not a substitute for the
97 .Xr wait 1
98 builtin
99 as it will not clean up any zombies or state in the parent process.
100 .Sh HISTORY
101 A
102 .Nm
103 command first appeared in SunOS 5.8.