NEXT UP previous
Next: pause System Call

kill System Call

Most of the signals considered so far have been generated either automatically by a process changing state, by a hardware error like a floating point exception, or they have been generated by user intervention at the keyboard with interrupt and quit signals. In addition to this, it is also possible for a process to send any signal to another process deliberately if it has appropriate permissions. This is done by using the kill() system call:

	#include <signal.h>
	#include <sys/types.h>

	int kill(pid_t pid, int sig);

The sig parameter specifies which signal to send and the pid parameter specifies where to send it. The various values of pid have the following meanings:

In order for kill() to send a signal, the effective user ID of the calling process must be root, or it must match either the real or effective user ID of the receiving process.


NEXT UP previous
Next: pause System Call