Commit | Line | Data |
---|---|---|
0117641b KB |
1 | .\" Copyright (c) 1980 The Regents of the University of California. |
2 | .\" All rights reserved. | |
a4eea337 | 3 | .\" |
0117641b KB |
4 | .\" %sccs.include.redist.man% |
5 | .\" | |
6 | .\" @(#)killpg.2 6.4 (Berkeley) %G% | |
a4eea337 | 7 | .\" |
c7a602c7 | 8 | .TH KILLPG 2 "" |
a4eea337 KM |
9 | .UC 4 |
10 | .SH NAME | |
040e2838 | 11 | killpg \- send signal to a process group |
a4eea337 | 12 | .SH SYNOPSIS |
040e2838 KM |
13 | .ft B |
14 | killpg(pgrp, sig) | |
15 | .br | |
16 | int pgrp, sig; | |
17 | .ft R | |
a4eea337 KM |
18 | .SH DESCRIPTION |
19 | .I Killpg | |
20 | sends the signal | |
21 | .I sig | |
040e2838 KM |
22 | to the process group |
23 | .IR pgrp . | |
a4eea337 | 24 | See |
040e2838 KM |
25 | .IR sigvec (2) |
26 | for a list of signals. | |
a4eea337 KM |
27 | .PP |
28 | The sending process and members of the process group must | |
3fa31615 MK |
29 | have the same effective user ID, or |
30 | the sender must be the super-user. | |
a4eea337 | 31 | As a single special case the continue signal SIGCONT may be sent |
24c3ab84 | 32 | to any process that is a descendant of the current process. |
040e2838 KM |
33 | .SH "RETURN VALUE |
34 | Upon successful completion, a value of 0 is returned. Otherwise, | |
35 | a value of \-1 is returned and the global variable \fIerrno\fP | |
36 | is set to indicate the error. | |
37 | .SH "ERRORS | |
38 | \fIKillpg\fP will fail and no signal will be sent if any of the | |
39 | following occur: | |
40 | .TP 15 | |
41 | [EINVAL] | |
42 | \fISig\fP is not a valid signal number. | |
43 | .TP 15 | |
44 | [ESRCH] | |
3fa31615 MK |
45 | No process can be found in the process group specified by \fIpgrp\fP. |
46 | .TP 15 | |
47 | [ESRCH] | |
48 | The process group was given as 0 | |
49 | but the sending process does not have a process group. | |
040e2838 KM |
50 | .TP 15 |
51 | [EPERM] | |
52 | The sending process is not the super-user and one or more | |
53 | of the target processes has an effective user ID different from that | |
54 | of the sending process. | |
a4eea337 | 55 | .SH "SEE ALSO" |
040e2838 | 56 | kill(2), getpgrp(2), sigvec(2) |