ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/wait.htm

85 lines
2.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8">
<title>wait - Wait for process completion</title>
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</HEAD>
<body bgcolor="#FFFFFF">
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h2>wait - Wait for process completion</h2>
<strong>Synopsis</strong>
<p><strong>wait</strong> [ <em>job</em> ... ]</p>
<p><strong>Description</strong></p>
<p>You can use <strong>wait</strong> to wait for the specified <em>
jobs</em> to end. If <em>job</em> is not specified, <strong>
qsh</strong> waits for all child processes to end.</p>
<p><strong>Options</strong></p>
<p>None.</p>
<p><strong>Operands</strong></p>
<p>Each <em>job</em> specifies an active job. The job can be
specified as a:</p>
<ul>
<li>Number to refer to a process id. <strong>qsh</strong> waits for
the given process to end.</li>
<li>%number to refer to a job number. <strong>qsh</strong> waits
for all processes in the job to end.</li>
<li>%string to refer to a job whose name begins with string.
<strong>qsh</strong> waits for all processes in the job to
end.</li>
</ul>
<p><strong>Exit Status</strong></p>
<p>When no <em>job</em> was specified, the exit status is:</p>
<ul>
<li>0 when all running jobs have ended.</li>
<li>&gt;0 when unsuccessful.</li>
</ul>
<p>When at least one <em>job</em> was specified, the exit status is
the exit status of the last <em>job</em>.</p>
<p><strong>Related information</strong></p>
<ul>
<li><a href="jobs.htm">jobs - Display status of jobs in current
session</a></li>
<li><a href="kill.htm">kill - Terminate or signal
processes</a></li>
<li><a href="trap.htm">trap - Trap signals</a></li>
</ul>
<strong>Examples</strong>
<ol>
<li>Wait for process id 16825 to end: <strong>wait</strong>
16825</li>
<li>Wait for job number 5 to end: <strong>wait</strong> %5</li>
</ol>
</body>
</html>