Sends a signal to a list of processes. Returns the number of processes successfully signaled (which is not necessarily the same as the number actually killed).
$cnt = kill 1, $child1, $child2;kill 9, @goners;If SIGNAL is zero, no signal is sent to the process, but the kill(2) system call will check whether it's possible to send a signal to it (that means, to be brief, that the process is owned by the same user, or we are the super-user). This is a useful way to check that a child process is alive (even if only as a zombie) and hasn't changed its UID. Seeperlport for notes on the portability of this construct.
Unlike in the shell, if SIGNAL is negative, it kills process groups instead of processes. (On System V, a negativePROCESS number will also kill process groups, but that's not portable.) That means you usually want to use positive not negative signals. You may also use a signal name in quotes.
See"Signals" in perlipc for more details.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.