Proc::Killall(3pm)

Proc::Killall3pm

Kill all instances of a process by pattern matching the command-line

Usage

        use Proc::Killall;
        killall('HUP', 'xterm'); # SIGHUP all xterms
        killall('KILL', '^netscape$'); # SIGKILL to "netscape"

Overview

This module provides one function, killall(), which takes two parameters: a signal name or number (see kill()) and a process pattern. This pattern is matched against the process' command-line as the "ps" command would show it ("ps" is not used internally, instead a package called "Proc::ProcessTable" is used).

"killall" 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 successfully signaled. If any kills failed, the $! variable will be set based on that last one that failed (even if a successful kill happened afterward).

Prerequisites

"Proc::ProcessTable" is required for "Proc::Killall" to function.

Releases

13 releases since Debian 3.0 (Woody); the text changed 12 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. Arch

Author

Written in 2000 by Aaron Sherman <[email protected]>

"Proc::Killall" is copyright 2000 by Aaron Sherman, and may be distributed under the same terms as Perl itself.

From perl-proc-processtable 0.637-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.