kill - Terminate or signal processes
Synopsis
kill [ -s signame ] job ...
kill [ -n signum ] job ...
kill [ -sig ] job ...
kill -l [ signal ... ]
Description
You can use kill to send a signal to the specified jobs. You can specify a signal using:
- signame - A signal name.
- signum - A signal number.
- sig - Either a signal name or signal number with no space after the minus (-).
Note:
|
The valid signal numbers on i5/OS may be different than the signal numbers on other systems. You can list the valid signal names by specifying the -l option. For portability, you should always specify the signal name. |
Options
- -l
- List signal names. If there are no arguments, qsh displays all of the signal names. If signal is a name, qsh displays the corresponding signal number. If signal is a number, qsh displays the corresponding signal name.
- -n
- A signal number.
- -s
- A signal name in either uppercase or lowercase.
Operands
Each job specifies an active job. The job can be specified as a:
- Number to refer to a process id.
- %number to refer to a job number.
- %string to refer to a job whose name begins with string.
Exit status
- 0 when successful.
- >0 when unsuccessful. If the -l option was not specified, the exit status is the number of jobs to which qsh could not send the signal.
Examples
- Send the USR1 signal to process id 16711: kill -s USR1 16711
- Send the USR1 signal to job 1: kill -n 7 %1
- List the valid signal names: kill -l