Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Proc::Killall

Name Proc::Killall
Version 1.0
Located at /usr/lib64/perl5/vendor_perl
File /usr/lib64/perl5/vendor_perl/Proc/Killall.pm
Is Core No
Search CPAN for this module Proc::Killall
Documentation Proc::Killall
Module Details Proc::Killall

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, 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).


AUTHOR

Written in 2000 by Aaron Sherman <ajs@ajs.com>

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


PREREQUISITES

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


SEE ALSO

perl, perlfunc, perlvar, the Proc::ProcessTable manpage

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024