killterminate process |
KornShell Built-in |
kill
-l
[exit_status]
kill
[-s
signal_name] [pid ...]
[job-identifier ...]
kill
terminates a process by sending it a signal. The
default signal is SIGTERM
.
You may specify the following items on the command line:
-l
[exit_status]displays the names of all supported signals. If you specify
exit_status, and it is the exit code of a terminated process,
kill
displays the terminating signal of that
process.
-s
signal_namesends the signal signal_name to the process instead of the
SIGTERM
signal.
-
signal_nameis an obsolete equivalent of -s
signal_name.
-
signal_numberis an obsolete method of specifying a positive integer which represents
the signal to be used (instead of SIGTERM
) as the sig
argument in the effective call to kill
. The
relationship between signal_number and the portable
signal_name is shown in Table 1, Integer Values of Signals.
signal_number | signal_name |
---|---|
0 |
0 |
1 |
SIGHUP |
2 |
SIGINT |
3 |
SIGQUIT |
6 |
SIGABRT |
9 |
SIGKILL |
14 |
SIGALRM |
15 |
SIGTERM |
is the job identifier reported by the shell when a process is started
with &
. It is one way to identify a process. It is also
reported by the jobs
command.
is the process ID that the shell reports when a process is started
with &
. You can also find the pid using the
ps command.
0
Successful completion.
1
The specified signal was invalid or there was exactly one job or process that could not be killed.
2
Failure due to an invalid command line argument or there were exactly two jobs or processes that could not be killed.
>2
Tells the number of jobs or processes that could not be killed.
You specified a job-identifier that is not valid.
You specified a non-integer signal for kill
or
a signal that is outside the range of valid signal numbers.
kill
is provided as both an external utility and a built-in
MKS KornShell utility.