Proc::Killall(3)

πŸ’– Proc::Killall(3) β€” NAME πŸ’–

User Contributed Perl Documentation is the manual-name situation, bestie, and this section is 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 πŸ¦‹

okay so this module provides one function, killall(), and it takes two parameters: a signal name or number (see kill()) and a process pattern. that's the whole vibe check πŸ¦‹

This pattern is matched against the process' command-line as the ps command would show it. and bestie, ps is not used internally β€” instead a package called Proc::ProcessTable is used. no cap.

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). so yeah, that's the messy bit 😭

πŸ‘‘ AUTHOR πŸ‘‘

Written in 2000 by Aaron Sherman <ajs@ajs.com> β€” iconic, honestly.

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

πŸŽ€ PREREQUISITES πŸŽ€

Proc::ProcessTable is required for Proc::Killall to function. that's the prerequisite, bestie β€” don't skip it πŸŽ€

🌈 SEE ALSO 🌈

go look at perl, perlfunc, perlvar, and Proc::ProcessTable ✨

mwah πŸ’– source/version says perl v5.42.0, date says 2023-06-22, and this page is Proc::Killall(3) β€” byeee, bestie 🫢✨

πŸ“¦ where this page comes from