kill(2) System Calls Manual kill(2) kill - C (libc, -lc) #include int kill(pid_t pid, int sig); glibc (. feature_test_macros(7)): kill(): _POSIX_C_SOURCE kill() - - . pid , sig pid. pid 0, sig , . pid -1, sig , , 1 (init), . pid -1, sig , , ID -pid. sig 0, , ; ID . For a process to have permission to send a signal, it must either be privileged (under Linux: have the CAP_KILL capability in the user namespace of the target process), or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the target process. In the case of SIGCONT, it suffices when the sending and receiving processes belong to the same session. (Historically, the rules were different; see HISTORY.) On success, zero is returned. If signals were sent to a process group, success means that at least one signal was delivered. On error, -1 is returned, and errno is set to indicate the error. EINVAL . EPERM -. ESRCH - . , -- , , wait(2). POSIX.1-2024. 4.3BSD, SVr4, POSIX.1-1988. , Linux Across different kernel versions, Linux has enforced different rules for the permissions required for an unprivileged process to send a signal to another process. In Linux 1.0 to 1.2.2, a signal could be sent if the effective user ID of the sender matched effective user ID of the target, or the real user ID of the sender matched the real user ID of the target. From Linux 1.2.3 until 1.3.77, a signal could be sent if the effective user ID of the sender matched either the real or effective user ID of the target. The current rules, which conform to POSIX.1, were adopted in Linux 1.3.78. init 1 , . , , - . POSIX.1 , kill(-1,sig) sig , , , . Linux , kill(-1,sig) . POSIX.1 , , , sigwait(3), , , kill(). In Linux 2.6 up to and including Linux 2.6.7, there was a bug that meant that when sending signals to a process group, kill() failed with the error EPERM if the caller did not have permission to send the signal to any (rather than all) of the members of the process group. Notwithstanding this error return, the signal was still delivered to all of the processes for which the caller had permission to signal. kill(1), _exit(2), pidfd_send_signal(2), signal(2), tkill(2), exit(3), killpg(3), sigqueue(3), capabilities(7), credentials(7), signal(7) () Alex Nik , Azamat Hackimov , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 11 2026 . kill(2)