coreutils: kill invocation
1
1 24.1 ‘kill’: Send a signal to processes
1 =======================================
1
1 The ‘kill’ command sends a signal to processes, causing them to
1 terminate or otherwise act upon receiving the signal in some way.
1 Alternatively, it lists information about signals. Synopses:
1
1 kill [-s SIGNAL | --signal SIGNAL | -SIGNAL] PID...
1 kill [-l | --list | -t | --table] [SIGNAL]...
1
1 Due to shell aliases and built-in ‘kill’ functions, using an
1 unadorned ‘kill’ interactively or in a script may get you different
1 functionality than that described here. Invoke it via ‘env’ (i.e., ‘env
1 kill ...’) to avoid interference from the shell.
1
1 The first form of the ‘kill’ command sends a signal to all PID
1 arguments. The default signal to send if none is specified is ‘TERM’.
1 The special signal number ‘0’ does not denote a valid signal, but can be
1 used to test whether the PID arguments specify processes to which a
1 signal could be sent.
1
1 If PID is positive, the signal is sent to the process with the
1 process ID PID. If PID is zero, the signal is sent to all processes in
1 the process group of the current process. If PID is −1, the signal is
1 sent to all processes for which the user has permission to send a
1 signal. If PID is less than −1, the signal is sent to all processes in
1 the process group that equals the absolute value of PID.
1
1 If PID is not positive, a system-dependent set of system processes is
1 excluded from the list of processes to which the signal is sent.
1
1 If a negative PID argument is desired as the first one, it should be
1 preceded by ‘--’. However, as a common extension to POSIX, ‘--’ is not
1 required with ‘kill -SIGNAL -PID’. The following commands are
1 equivalent:
1
1 kill -15 -1
1 kill -TERM -1
1 kill -s TERM -- -1
1 kill -- -1
1
1 The first form of the ‘kill’ command succeeds if every PID argument
1 specifies at least one process that the signal was sent to.
1
1 The second form of the ‘kill’ command lists signal information.
1 Either the ‘-l’ or ‘--list’ option, or the ‘-t’ or ‘--table’ option must
1 be specified. Without any SIGNAL argument, all supported signals are
1 listed. The output of ‘-l’ or ‘--list’ is a list of the signal names,
1 one per line; if SIGNAL is already a name, the signal number is printed
1 instead. The output of ‘-t’ or ‘--table’ is a table of signal numbers,
1 names, and descriptions. This form of the ‘kill’ command succeeds if
1 all SIGNAL arguments are valid and if there is no output error.
1
1 The ‘kill’ command also supports the ‘--help’ and ‘--version’
1 options. ⇒Common options.
1
1 A SIGNAL may be a signal name like ‘HUP’, or a signal number like
1 ‘1’, or an exit status of a process terminated by the signal. A signal
1 name can be given in canonical form or prefixed by ‘SIG’. The case of
1 the letters is ignored, except for the ‘-SIGNAL’ option which must use
11 upper case to avoid ambiguity with lower case option letters. ⇒
Signal specifications, for a list of supported signal names and
1 numbers.
1