KILL(2) — UNIX Programmer’s Manual
NAME
kill − send signal to a process
SYNOPSIS
kill(pid, sig)
int pid;
int sig;
DESCRIPTION
Kill sends the signal sig to the process specified by the process number pid. See signal(2) for a list of signals.
The sending and receiving processes must have the same effective user ID, otherwise this call is restricted to the super-user.
If the process number is 0, the signal is sent to all processes in the sender’s process group; see tty(4).
If the process number is −1, and the user is the super-user, the signal is broadcast universally except to processes 0, 1, the scheduler initialization, and the process sending the signal.
Processes may send signals to themselves.
SEE ALSO
DIAGNOSTICS
Zero is returned if the process is killed; −1 is returned if the process does not have the same effective user ID and the user is not super-user, or if the process does not exist.
7th Edition — 1/19/82