1KILLPG(3) Linux Programmer's Manual KILLPG(3)
2
3
4
6 killpg - send signal to all members of a process group
7
9 #include <signal.h>
10
11 int killpg(pid_t pgrp, int signal);
12
14 The killpg() function causes signal signal to be sent to all the pro‐
15 cesses in the process group pgrp or to the processes' own process group
16 if pgrp is equal to zero.
17
18 If pgrp is greater than 1, it is equivalent to
19
20 kill(-pgrp,signal);
21
23 The value returned is -1 on error, or 0 for success.
24
26 Errors are returned in errno and can be one of the following:
27
28 EINVAL for an invalid signal,
29
30 EPERM if the userid of the calling process is not equal to that of the
31 process the signal is sent to, and the userid is not that of the
32 superuser.
33
34 ESRCH for a process group which does not exist, and
35
37 SUSv2, POSIX.1-2001
38
40 kill(2), signal(2), sigqueue(2), signal(7)
41
42
43
44GNU 1993-04-04 KILLPG(3)