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