man Proc::Killall () - Kill all instances of a process by pattern matching the command-line
NAME
killall - Kill all instances of a process by pattern matching the command-line
SYNOPSIS
use Proc::Killall;
killall('HUP', 'xterm'); # SIGHUP all xterms killall('KILL', '^netscape$'); # SIGKILL to "netscape"
DESCRIPTION
This module provides one function, CWkillall(), which takes two parameters: a signal name or number (see CWkill()) and a process pattern. This pattern is matched against the process' command-line as the CWps command would show it (CWps is not used internally, instead a package called CWProc::ProcessTable is used).
CWkillall searches the process table and sends that signal to all processes which match the pattern. The return value is the number of processes that were succesfully signaled. If any kills failed, the CW$! variable will be set based on that last one that failed (even if a successful kill happened afterward).
AUTHOR
Written in 2000 by Aaron Sherman <ajs@ajs.com>
CWProc::Killall is copyright 2000 by Aaron Sherman, and may be distributed under the same terms as Perl itself.
PREREQUISITES
CWProc::ProcessTable is required for CWProc::Killall to function.
SEE ALSO
perl, perlfunc, perlvar, Proc::ProcessTable