|
|
#include <sys/types.h> #include <signal.h>
int kill(pid_t pid, int sig);
The real or effective user ID of the sending process must match the real or saved (from exec.2 user ID of the receiving process unless the effective user ID of the sending process is super-user, (see intro.2 or sig is SIGCONT and the sending process has the same session ID as the receiving process.
If pid is greater than 0, sig will be sent to the process whose process ID is equal to pid.
If pid is negative but not (pid_t)-1, sig will be sent to all processes whose process group ID is equal to the absolute value of pid and for which the process has permission to send a signal.
If pid is 0, sig will be sent to all processes excluding special processes (see intro.2 whose process group ID is equal to the process group ID of the sender.
If pid is (pid_t)-1 and the effective user ID of the sender is not super-user, sig will be sent to all processes excluding special processes whose real user ID is equal to the effective user ID of the sender.
If pid is (pid_t)-1 and the effective user ID of the sender is super-user, sig will be sent to all processes excluding special processes.
kill() will fail and no signal will be sent if one or more of the following are true:
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97