Deleted Added
full compact
kill.2 (108028) kill.2 (108087)
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
1.\" Copyright (c) 1980, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
33.\" $FreeBSD: head/lib/libc/sys/kill.2 108028 2002-12-18 09:22:32Z ru $
33.\" $FreeBSD: head/lib/libc/sys/kill.2 108087 2002-12-19 09:40:28Z ru $
34.\"
35.Dd April 19, 1994
36.Dt KILL 2
37.Os
38.Sh NAME
39.Nm kill
40.Nd send signal to a process
41.Sh LIBRARY

--- 7 unchanged lines hidden (view full) ---

49The
50.Fn kill
51system call sends the signal given by
52.Fa sig
53to
54.Fa pid ,
55a
56process or a group of processes.
34.\"
35.Dd April 19, 1994
36.Dt KILL 2
37.Os
38.Sh NAME
39.Nm kill
40.Nd send signal to a process
41.Sh LIBRARY

--- 7 unchanged lines hidden (view full) ---

49The
50.Fn kill
51system call sends the signal given by
52.Fa sig
53to
54.Fa pid ,
55a
56process or a group of processes.
57.Fa Sig
57The
58.Fa sig
59argument
58may be one of the signals specified in
59.Xr sigaction 2
60or it may be 0, in which case
61error checking is performed but no
62signal is actually sent.
63This can be used to check the validity of
64.Fa pid .
65.Pp
66For a process to have permission to send a signal to a process designated
67by
68.Fa pid ,
69the real or effective user ID of the receiving process must match
70that of the sending process or the user must have appropriate privileges
71(such as given by a set-user-ID program or the user is the super-user).
72A single exception is the signal SIGCONT, which may always be sent
73to any descendant of the current process.
74.Bl -tag -width Ds
75.It \&If Fa pid No \&is greater than zero :
60may be one of the signals specified in
61.Xr sigaction 2
62or it may be 0, in which case
63error checking is performed but no
64signal is actually sent.
65This can be used to check the validity of
66.Fa pid .
67.Pp
68For a process to have permission to send a signal to a process designated
69by
70.Fa pid ,
71the real or effective user ID of the receiving process must match
72that of the sending process or the user must have appropriate privileges
73(such as given by a set-user-ID program or the user is the super-user).
74A single exception is the signal SIGCONT, which may always be sent
75to any descendant of the current process.
76.Bl -tag -width Ds
77.It \&If Fa pid No \&is greater than zero :
76.Fa Sig
78The
79.Fa sig
80signal
77is sent to the process whose ID is equal to
78.Fa pid .
79.It \&If Fa pid No \&is zero :
81is sent to the process whose ID is equal to
82.Fa pid .
83.It \&If Fa pid No \&is zero :
80.Fa Sig
84The
85.Fa sig
86signal
81is sent to all processes whose group ID is equal
82to the process group ID of the sender, and for which the
83process has permission;
84this is a variant of
85.Xr killpg 2 .
86.It \&If Fa pid No \&is -1 :
87If the user has super-user privileges,
88the signal is sent to all processes excluding

--- 20 unchanged lines hidden (view full) ---

109.Rv -std kill
110.Sh ERRORS
111The
112.Fn kill
113system call
114will fail and no signal will be sent if:
115.Bl -tag -width Er
116.It Bq Er EINVAL
87is sent to all processes whose group ID is equal
88to the process group ID of the sender, and for which the
89process has permission;
90this is a variant of
91.Xr killpg 2 .
92.It \&If Fa pid No \&is -1 :
93If the user has super-user privileges,
94the signal is sent to all processes excluding

--- 20 unchanged lines hidden (view full) ---

115.Rv -std kill
116.Sh ERRORS
117The
118.Fn kill
119system call
120will fail and no signal will be sent if:
121.Bl -tag -width Er
122.It Bq Er EINVAL
117.Fa Sig
123The
124.Fa sig
125argument
118is not a valid signal number.
119.It Bq Er ESRCH
120No process can be found corresponding to that specified by
121.Fa pid .
122.It Bq Er ESRCH
123The process id was given as 0
124but the sending process does not have a process group.
125.It Bq Er EPERM

--- 22 unchanged lines hidden ---
126is not a valid signal number.
127.It Bq Er ESRCH
128No process can be found corresponding to that specified by
129.Fa pid .
130.It Bq Er ESRCH
131The process id was given as 0
132but the sending process does not have a process group.
133.It Bq Er EPERM

--- 22 unchanged lines hidden ---