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

123 lines
3.1 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>kill - Terminate or signal processes</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>kill - Terminate or signal processes</h2>
<strong>Synopsis</strong>
<p><strong>kill</strong> [ <strong>-s</strong> <em>signame</em> ]
<em>job</em> ...</p>
<p><strong>kill</strong> [ <strong>-n</strong> <em>signum</em> ]
<em>job</em> ...</p>
<p><strong>kill</strong> [ <strong>-sig</strong> ] <em>job</em>
...</p>
<p><strong>kill -l</strong> [ <em>signal</em> ... ]</p>
<p><strong>Description</strong></p>
<p>You can use kill to send a signal to the specified <em>
jobs</em>. You can specify a signal using:</p>
<ul>
<li><em>signame</em> - A signal name.</li>
<li><em>signum</em> - A signal number.</li>
<li><em>sig</em> - Either a signal name or signal number with no
space after the minus (<strong>-</strong>).</li>
</ul>
<table>
<tr>
<td valign="top"><strong>Note:</strong></td>
<td>The valid signal numbers on i5/OS<SUP>(TM)</SUP> may be different than the
signal numbers on other systems. You can list the valid signal
names by specifying the <strong>-l</strong> option. For
portability, you should always specify the signal name.</td>
</tr>
</table>
<p><strong>Options</strong></p>
<dl>
<dt><strong>-l</strong></dt>
<dd>List signal names. If there are no arguments, <strong>
qsh</strong> displays all of the signal names. If <em>signal</em>
is a name, <strong>qsh</strong> displays the corresponding signal
number. If <em>signal</em> is a number, <strong>qsh</strong>
displays the corresponding signal name.</dd>
<dt><strong>-n</strong></dt>
<dd>A signal number.</dd>
<dt><strong>-s</strong></dt>
<dd>A signal name in either uppercase or lowercase.</dd>
</dl>
<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.</li>
<li>%number to refer to a job number.</li>
<li>%string to refer to a job whose name begins with string.</li>
</ul>
<p><strong>Exit Status</strong></p>
<ul>
<li>0 when successful.</li>
<li>&gt;0 when unsuccessful. If the <strong>-l</strong> option was
not specified, the exit status is the number of jobs to which
<strong>qsh</strong> could not send the signal.</li>
</ul>
<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="trap.htm">trap - Trap signals</a></li>
<li><a href="wait.htm">wait - Wait for process completion</a></li>
</ul>
<strong>Examples</strong>
<ol>
<li>Send the USR1 signal to process id 16711: <strong>kill</strong>
-s USR1 16711</li>
<li>Send the USR1 signal to job 1: <strong>kill</strong> -n 7
%1</li>
<li>List the valid signal names: <strong>kill</strong> -l</li>
</ol>
</body>
</html>