Content-type: text/html
kill - Sends a signal to a running process
kill -l [exit_status]
kill [-signal_name|signal_number] process_ID...
kill -s signal_name process_ID...
The C shell has a built-in version of the kill command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/kill. See the csh(1) reference page for a description of the built-in command.
Interfaces documented on this reference page conform to industry standards as follows:
kill: XPG4, XPG4-UNIX
Refer to the
standards(5)
reference page for more information
about industry standards and associated tags.
The kill command supports the following options: Lists signal names.
A process identification number
The kill command sends a signal to one or more running processes. The default is the SIGTERM signal (signal number 15), which usually terminates processes that do not ignore or catch the signal.
You identify the process to be signaled by specifying its process identification number (also known as the process ID or PID). The shell displays the PID of each process that is running in the background or, if you start more than one process in a pipeline, the shell displays the number of the last process. You can also use the ps command to display PIDs.
[Compaq] The name of the kill command is misleading because many signals, including SIGUSR1, do not terminate processes.
[Compaq] Unless you are operating with superuser authority, the process you wish to signal must belong to you. When operating with superuser authority, you can signal any process.
[Compaq] See the
kill()
system call for a complete
discussion of
kill. Note that the
csh
command contains a built-in subcommand named
kill, but
the command and subcommand do not necessarily work in the same way. For information
on the subcommand, see
csh.
The following exit values are returned:
At least one matching process was found, and the specified
signal was successfully processed for at least one matching process.
An error occurred.
The following command terminates the process with the specified PID: kill 1095
1) HUP 13) PIPE 25) XFSZ 37) RTMIN+4
2) INT 14) ALRM 26) VTALRM 38) RTMIN+5
3) QUIT 15) TERM 27) PROF 39) RTMIN+6
4) ILL 16) URG 28) WINCH 40) RTMIN+7
5) TRAP 17) STOP 29) PWR 41) RTMAX-7
6) LOST 18) TSTP 30) USR1 42) RTMAX-6
7) EMT 19) CONT 31) USR2 43) RTMAX-5
8) FPE 20) CHLD 32) RESV 44) RTMAX-4
9) KILL 21) TTIN 33) RTMIN 45) RTMAX-3
10) BUS 22) TTOU 34) RTMIN+1 46) RTMAX-2
11) SEGV 23) POLL 35) RTMIN+2 47) RTMAX-1
12) SYS 24) XCPU 36) RTMIN+3 48) RTMAX
The following environment variables affect the execution of
kill:
Provides a default value for the internationalization variables
that are unset or null. If
LANG
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multibyte characters in arguments).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
of
LC_MESSAGES.
Commands: csh(1), killall(8), ksh(1), ps(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: kill(2), sigaction(2)
Standards: standards(5)