summaryrefslogtreecommitdiffstats
path: root/man3/killpg.3
blob: a394c49d9d57908e4572198d71adebe803a6c4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\" This file can be distributed under the terms of the GNU General Public
.\" License.
.\" Modified Sat Jul 24 19:04:55 1993 by Rik Faith (faith@cs.unc.edu)
.TH KILLPG 3  "April 4, 1993" "GNU" "Linux Programmer's Manual"
.SH NAME
killpg \- send signal to all members of a process group.
.SH SYNOPSIS
.nf
.B #include <signal.h>
.sp
.BI "int killpg(pid_t " pidgrp ", int " signal ");"
.fi
.SH DESCRIPTION
The
.B killpg()
function causes signal
.I signal
to be sent to all the processes in the process group
.I pidgrp
or to the processes' own process group if
.I pidgrp
is equal to zero.
.PP
It is equivalent to
.nf
.sp
.BI kill(- pidgrp , signal );
.fi
.SH "RETURN VALUE"
The value returned is \-1 on error, or 0 for success.
.SH ERRORS
Errors are returned in
.I errno
and can be one of the following:
.TP
.B EINVAL
for an invalid signal,
.TP
.B ESRCH
for a process group which does not exist, and
.TP
.B EPERM
if the userid of the calling process is not equal to that of the
process the signal ist sent to, and the userid is not that of the
superuser.
.SH "CONFORMS TO"
???
.SH SEE ALSO
.BR kill "(2), " signal "(2), " signal (7)