killpg(3) Library Functions Manual killpg(3) killpg - LIBRARY Standard C library (libc, -lc) #include int killpg(int pgrp, int sig); glibc (. feature_test_macros(7)): killpg(): _XOPEN_SOURCE >= 500 || /* glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE killpg() sig pgrp. signal(7). pgrp 0, killpg() ( POSIX: pgrp 1, ). , , kill(2). On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error. EINVAL sig . EPERM -. kill(2). ESRCH pgrp . ESRCH 0, - . There are various differences between the permission checking in BSD-type systems and System V-type systems. See the POSIX rationale for kill(3p). A difference not mentioned by POSIX concerns the return value EPERM: BSD documents that no signal is sent and EPERM returned when the permission check failed for at least one target process, while POSIX documents EPERM only when the permission check failed for all target processes. C Linux killpg() , kill(-pgrp, sig). POSIX.1-2008. POSIX.1-2001, SVr4, 4.4BSD (first appeared in 4BSD). . getpgrp(2), kill(2), signal(2), capabilities(7), credentials(7) Alex Nik , Azamat Hackimov , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . killpg(3)