kill -- send a signal


#include <signal.h>

int kill(pid_t pid, int sig);


kill() is as specified in the POSIX 1003.1-2008 (ISO/IEC 9945-2009), but with 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 POSIX 1003.1-2008 (ISO/IEC 9945-2009) apply.

Rationale: This was a deliberate Linus decision after an unpopular experiment in including the calling process in the 2.5.1 kernel. See "What does it mean to signal everybody?", Linux Weekly News, 20 December 2001,