
kill(1) |
|
| kill(1) |
24 | SIGSTOP | Stop | Pause the process; cannot be trapped |
25 | SIGTSTP | Terminal stop | Pause the process; can be trapped |
26 | SIGCONT | Continue | Run a stopped process |
SIGNULL (0), the null signal, invokes error checking but no signal is actually sent. This can be used to test the validity or existence of pid.
SIGTERM (15), the (default) terminate signal, can be trapped by the receiving process, allowing the receiver to execute an orderly shutdown or to ignore the signal entirely. For orderly operations, this is the perferred choice.
SIGKILL (9), the kill signal, forces a process to terminate immediately. Since SIGKILL cannot be trapped or ignored, it is useful for terminating a process that does not respond to SIGTERM.
The receiving process must belong to the user of the sending process, unless the user has appropriate privileges.
As a single special case, the continue signal SIGCONT can be sent to any process that is a member of the same session as the sending process.
RETURN VALUE
Upon completion, kill returns with one of the following values:
0At least one matching process was found for each pid operand, and the speci®ed signal was suc- cessfully processed for at least one matching process.
>0 An error occurred.
EXAMPLES
The command:
kill 6135
signals process number 6135 to terminate. This gives the process an opportunity to exit gracefully (remov- ing temporary ®les, etc.).
The following equivalent commands:
kill
terminate process number 6135 abruptly by sending a SIGKILL signal to the process. This tells the kernel to remove the process immediately.
WARNINGS
If a process hangs during some operation (such as I/O) so that it is never scheduled, it cannot die until it is allowed to run. Thus, such a process may never go away after the kill. Similarly, defunct processes (see ps(1)) may have already ®nished executing, but remain on the system until their parent reaps them (see wait(2)). Using kill to send signals to them has no effect.
Some
DEPENDENCIES
This manual entry describes the external command /usr/bin/kill and the
SEE ALSO
csh(1), ksh(1), ps(1), sh(1),
STANDARDS CONFORMANCE
kill: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
k
− 2 − | Section 1−391 |