Go to the previous, next section.

kill

SYNOPSIS

int kill(pit_t pid, int sig);

PARAMETERS

pid: [in] the process or process group to send the signal to.

sig: [in] the signal to send.

DESCRIPTION

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.

RETURN VALUE

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:

Go to the previous, next section.