1 .\" Copyright (c) 1980, 1991 Regents of the University of California.
2 .\" All rights reserved.
4 .\" SPDX-License-Identifier: BSD-4-Clause-UC
6 .\" @(#)killpg.2 6.5 (Berkeley) 3/10/91
8 .\" Modified Fri Jul 23 21:55:01 1993 by Rik Faith <faith@cs.unc.edu>
9 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
10 .\" Modified 2004-06-16 by Michael Kerrisk <mtk.manpages@gmail.com>
11 .\" Added notes on CAP_KILL
12 .\" Modified 2004-06-21 by aeb
14 .TH KILLPG 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
16 killpg \- send signal to a process group
19 .RI ( libc ", " \-lc )
22 .B #include <signal.h>
24 .BI "int killpg(int " pgrp ", int " sig );
28 Feature Test Macro Requirements for glibc (see
29 .BR feature_test_macros (7)):
35 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
36 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
37 || /* Glibc <= 2.19: */ _BSD_SOURCE
47 for a list of signals.
53 sends the signal to the calling process's process group.
56 is less than or equal to 1, the behavior is undefined.)
58 For the permissions required to send a signal to another process, see
61 On success, zero is returned.
62 On error, \-1 is returned, and
64 is set to indicate the error.
69 is not a valid signal number.
72 The process does not have permission to send the signal
73 to any of the target processes.
74 For the required permissions, see
78 No process can be found in the process group specified by
82 The process group was given as 0 but the sending process does not
85 POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
87 first appeared in 4BSD).
89 There are various differences between the permission checking
90 in BSD-type systems and System\ V-type systems.
91 See the POSIX rationale for
93 A difference not mentioned by POSIX concerns the return
96 BSD documents that no signal is sent and
98 returned when the permission check failed for at least one target process,
101 only when the permission check failed for all target processes.
102 .SS C library/kernel differences
105 is implemented as a library function that makes the call
106 .IR "kill(\-pgrp,\ sig)" .
111 .BR capabilities (7),