Table of Contents

Name

kill - terminate or signal processes

Synopsis

kill -s signal_name pid ...

kill -l [exit_status]

kill [-signal_name] pid ...

kill [-signal_number] pid ...

Description

The kill utility shall send a signal to the process or processes specified by each pid operand.

For each pid operand, the kill utility shall perform actions equivalent to the kill() function defined in the System Interfaces volume of IEEE Std 1003.1-2001 called with the following arguments:

The value of the pid operand shall be used as the pid argument.

The sig argument is the value specified by the -s option, - signal_number option, or the - signal_name option, or by SIGTERM, if none of these options is specified.

Options

The kill utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines, except that in the last two SYNOPSIS forms, the - signal_number and - signal_name options are usually more than a single character.

The following options shall be supported:

-l
(The letter ell.) Write all values of signal_name supported by the implementation, if no operand is given. If an exit_status operand is given and it is a value of the ’?’ shell special parameter (see Special Parameters and wait() ) corresponding to a process that was terminated by a signal, the signal_name corresponding to the signal that terminated the process shall be written. If an exit_status operand is given and it is the unsigned decimal integer value of a signal number, the signal_name (the symbolic constant name without the SIG prefix defined in the Base Definitions volume of IEEE Std 1003.1-2001) corresponding to that signal shall be written. Otherwise, the results are unspecified.
-s signal_name

Specify the signal to send, using one of the symbolic names defined in the <signal.h> header. Values of signal_name shall be recognized in a case-independent fashion, without the SIG prefix. In addition, the symbolic name 0 shall be recognized, representing the signal value zero. The corresponding signal shall be sent instead of SIGTERM.

-signal_name

Equivalent to -s signal_name.

-signal_number

Specify a non-negative decimal integer, signal_number, representing the signal to be used instead of SIGTERM, as the sig argument in the effective call to kill(). The correspondence between integer values and the sig value used is shown in the following table.

The effects of specifying any signal_number other than those listed in the table are undefined.

Operands

pidOne of the following:

Stdin

Input Files

Environment Variables

Asynchronous Events

Stdout



Stderr

Output Files

Extended Description

Exit Status

Consequences of Errors

Application Usage


Examples




Rationale


Future Directions

See Also

Copyright

If the first argument is a negative integer, it shall be interpreted
as a - signal_number option, not as a
negative pid operand specifying a process group.
The following operands shall be supported:
A decimal integer specifying a process or process group to be signaled.
The process or processes selected by positive, negative,
and zero values of the pid operand shall be as described for


Table of Contents