Go to the previous, next section.
int kill(pit_t pid, int sig);
pid: [in] the process or process group to send the signal to.
sig: [in] the signal to send.
Sends a signal to a process or a process group. If pid is positive then it is send to the process with pid equal to pid. If pid is -1, the signal is send to every process except the first. If pid is less than -1, the signal is send to the process group with group pid equals to -pid.
On success, for pid less than -1, the number of processes that
received the signal is returned, for other values of pid, zero is
returned. On error -1 is returned and errno
is set to one of the
following values:
EINVAL
: the value of sig is invalid.
Go to the previous, next section.