Penguin
Annotated edit history of kill(2) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 kill - send signal to a process
3 !!SYNOPSIS
2 PerryLorier 4 __#include <sys/types.h>__
5 __#include <signal.h>__
6 __int kill(pid_t__ ''pid''__, int__ ''sig''__);__
1 perry 7 !!DESCRIPTION
2 PerryLorier 8 The kill(2) system call can be used to send any signal to any process group or process.
1 perry 9
2 PerryLorier 10 If ''pid'' is positive, then signal ''sig'' is sent to ''pid''.
1 perry 11
2 PerryLorier 12 If ''pid'' equals 0, then ''sig'' is sent to every process in the process group of the current process.
1 perry 13
2 PerryLorier 14 If ''pid'' equals -1, then ''sig'' is sent to every process except for the first one.
1 perry 15
2 PerryLorier 16 If ''pid'' is less than -1, then ''sig'' is sent to every process in the process group ''-pid''.
1 perry 17
2 PerryLorier 18 If ''sig'' is 0, then no signal is sent, but error checking is still performed. This is an excellent way to see if a process is still running, send it signal 0, then check to see if you got [ESRCH] as an error.
1 perry 19
20 !!RETURN VALUE
2 PerryLorier 21 On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately.
1 perry 22 !!ERRORS
2 PerryLorier 23 ;[EINVAL]: An invalid signal was specified.
24 ;[ESRCH]: The pid or process group does not exist. Note that an existing process might be a zombie, a process which already committed termination, but has not yet been [wait4(2)]ed for.
25 ;[EPERM]: The process does not have permission to send the signal to any of the receiving processes. For a process to have permission to send a signal to process ''pid'' it must either have root privileges, or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the receiving process. In the case of [SIGCONT] it suffices when the sending and receiving processes belong to the same session.
1 perry 26
27 !!BUGS
2 PerryLorier 28 It is impossible to send a signal to task number one, the init process, for which it has not installed a signal handler. This is done to assure the system is not brought
29 down accidentally.
1 perry 30
31 !!CONFORMING TO
2 PerryLorier 32 SVr4, SVID, POSIX.1, X/OPEN, BSD 4.3
1 perry 33
34 !!SEE ALSO
2 PerryLorier 35 _exit(2), exit(3), signal(2), signal(7)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 6 times)