blob: a57d28cbaef7a48460d1e205c40e52b7e087372c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>execline: the wait command</title>
<meta name="Description" content="execline: the wait command" />
<meta name="Keywords" content="execline command wait" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">execline</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>
<h1> The <tt>wait</tt> program </h1>
<p>
<tt>wait</tt> waits for a set of children, then executes a program.
</p>
<h2> Interface </h2>
<p>
In an <a href="execlineb.html">execlineb</a> script:
</p>
<pre>
wait [ -I | -i ] [ -r | -t <em>timeout</em> ] { [ <em>pids...</em> ] } <em>prog...</em>
</pre>
<ul>
<li> <tt>wait</tt> reads a list of <em>pids</em> in a
(possibly empty) <a href="el_semicolon.html">block</a>,
and unquotes it. </li>
<li> <tt>wait</tt> waits for every child whose pid is
listed in <em>pids...</em>. If <em>pids...</em> is an
empty list, it waits for every child process it has. </li>
<li><tt>wait</tt> then execs into <em>prog...</em>. </li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-r</tt> : equivalent to <tt>-t 0</tt>. Do not
pause: only reap processes that are already dead when <tt>wait</tt>
is invoked. </li>
<li> <tt>-t</tt> <em>timeout</em> : wait for a maximum
of <em>timeout</em> milliseconds. If there still are living processes
among <em>pids...</em> (or among <tt>wait</tt>'s children if
<em>pids...</em> is an empty list), after <em>timeout</em>
milliseconds, they will not be reaped. </li>
<li> <tt>-I</tt> : loose. If <tt>wait</tt> times out while
waiting for children to die, it will still
exec into <em>prog...</em>. This is the default. </li>
<li> <tt>-i</tt> : strict. If <tt>wait</tt> times out, it
will print an error message and exit 1. </li>
</ul>
</body>
</html>
|