--- name: kill status: documented runtime: pp source: src/runtime/pp/process.rs --- ```{index} single: kill; Perl built-in (pp runtime) ``` # kill ## Synopsis ```perl kill 'TERM', $pid; # send SIGTERM by name kill 15, $pid; # send SIGTERM by number kill 'TERM', $pid1, $pid2; # signal multiple processes kill 0, $pid; # check if process exists kill -15, $pgrp; # signal a process group ``` ## Description Sends a signal to one or more processes or process groups. The first argument is the signal, specified either as a name (`'TERM'`, `'HUP'`, with or without `SIG` prefix) or as a number. The remaining arguments are PIDs to signal. If the signal is negative, the absolute value is sent to the process **group** identified by each PID (using `kill(-sig, -abs(pid))`). Signal `0` does not actually send a signal but checks whether the process exists and is reachable (permission check). Returns the number of processes successfully signaled. ## See also `%SIG`, POSIX signals, fork, waitpid