kill -- send a signal


int kill(pid_t pid, int sig);


The specification for "kill" is as specified in the SUSv2 but with the following differences as listed below.

Process ID -1 doesn't affect calling process

If pid is specified as -1, sig shall not be sent to the calling process. Other than this, the rules in the SUSv2 apply.

Rationale: Linux users/programs expect to exclude the calling process, which is the historic Linux behavior. After an experiment with including the calling process in 2.5.1 Linus has decided to go back to the traditional Linux behavior. Affected programs include killall5 and some versions of shutdown. Another example is the shell command "kill -KILL -1" which is expected to not kill the shell from which it is run. See "What does it mean to signal everybody?", Linux Weekly News, 20 December 2001 ( ).