1Proc::Killall(3) User Contributed Perl Documentation Proc::Killall(3)
2
3
4
6 killall - Kill all instances of a process by pattern matching the
7 command-line
8
10 use Proc::Killall;
11
12 killall('HUP', 'xterm'); # SIGHUP all xterms
13 killall('KILL', '^netscape$'); # SIGKILL to "netscape"
14
16 This module provides one function, killall(), which takes two
17 parameters: a signal name or number (see kill()) and a process pattern.
18 This pattern is matched against the process' command-line as the "ps"
19 command would show it ("ps" is not used internally, instead a package
20 called "Proc::ProcessTable" is used).
21
22 "killall" searches the process table and sends that signal to all
23 processes which match the pattern. The return value is the number of
24 processes that were successfully signaled. If any kills failed, the $!
25 variable will be set based on that last one that failed (even if a
26 successful kill happened afterward).
27
29 Written in 2000 by Aaron Sherman <ajs@ajs.com>
30
31 "Proc::Killall" is copyright 2000 by Aaron Sherman, and may be
32 distributed under the same terms as Perl itself.
33
35 "Proc::ProcessTable" is required for "Proc::Killall" to function.
36
38 perl, perlfunc, perlvar, Proc::ProcessTable
39
40
41
42perl v5.36.0 2023-01-20 Proc::Killall(3)