date and time created 91/03/07 10:23:53 by bostic
[unix-history] / usr / src / lib / libc / compat-43 / killpg.2
CommitLineData
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 11killpg \- send signal to a process group
a4eea337 12.SH SYNOPSIS
040e2838
KM
13.ft B
14killpg(pgrp, sig)
15.br
16int pgrp, sig;
17.ft R
a4eea337
KM
18.SH DESCRIPTION
19.I Killpg
20sends the signal
21.I sig
040e2838
KM
22to the process group
23.IR pgrp .
a4eea337 24See
040e2838
KM
25.IR sigvec (2)
26for a list of signals.
a4eea337
KM
27.PP
28The sending process and members of the process group must
3fa31615
MK
29have the same effective user ID, or
30the sender must be the super-user.
a4eea337 31As a single special case the continue signal SIGCONT may be sent
24c3ab84 32to any process that is a descendant of the current process.
040e2838
KM
33.SH "RETURN VALUE
34Upon successful completion, a value of 0 is returned. Otherwise,
35a value of \-1 is returned and the global variable \fIerrno\fP
36is set to indicate the error.
37.SH "ERRORS
38\fIKillpg\fP will fail and no signal will be sent if any of the
39following occur:
40.TP 15
41[EINVAL]
42\fISig\fP is not a valid signal number.
43.TP 15
44[ESRCH]
3fa31615
MK
45No process can be found in the process group specified by \fIpgrp\fP.
46.TP 15
47[ESRCH]
48The process group was given as 0
49but the sending process does not have a process group.
040e2838
KM
50.TP 15
51[EPERM]
52The sending process is not the super-user and one or more
53of the target processes has an effective user ID different from that
54of the sending process.
a4eea337 55.SH "SEE ALSO"
040e2838 56kill(2), getpgrp(2), sigvec(2)