4.3BSD beta release manual page
[unix-history] / usr / src / lib / libc / compat-43 / killpg.2
... / ...
CommitLineData
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.\"
5.\" @(#)killpg.2 6.1 (Berkeley) %G%
6.\"
7.TH KILLPG 2 ""
8.UC 4
9.SH NAME
10killpg \- send signal to a process group
11.SH SYNOPSIS
12.ft B
13killpg(pgrp, sig)
14.br
15int pgrp, sig;
16.ft R
17.SH DESCRIPTION
18.I Killpg
19sends the signal
20.I sig
21to the process group
22.IR pgrp .
23See
24.IR sigvec (2)
25for a list of signals.
26.PP
27The sending process and members of the process group must
28have the same effective user ID, otherwise
29this call is restricted to the super-user.
30As a single special case the continue signal SIGCONT may be sent
31to any process which is a descendant of the current process.
32.SH "RETURN VALUE
33Upon successful completion, a value of 0 is returned. Otherwise,
34a value of \-1 is returned and the global variable \fIerrno\fP
35is set to indicate the error.
36.SH "ERRORS
37\fIKillpg\fP will fail and no signal will be sent if any of the
38following occur:
39.TP 15
40[EINVAL]
41\fISig\fP is not a valid signal number.
42.TP 15
43[ESRCH]
44No process can be found corresponding to that specified by \fIpid\fP.
45.TP 15
46[EPERM]
47The sending process is not the super-user and one or more
48of the target processes has an effective user ID different from that
49of the sending process.
50.SH "SEE ALSO"
51kill(2), getpgrp(2), sigvec(2)