What's the best way to send a signal to all members of a process group?
I want to kill a whole process tree. What is the best way to do this using any common scripting languages? I am looking for a simple solution.
1 Expert Answer
Engineer with 10+ years of experience.
You probably want one of pkill or pgrep, from their man page:
-g, --pgroup pgrp,...
Only match processes in the process group IDs listed. Process group 0 is
translated into pgrep's or pkill's own process group.
-G, --group gid,...
Only match processes whose real group ID is listed. Either the numerical or
symbolical value may be used.
Still looking for help? Get the right answer, fast.
Find an Online Tutor Now
Choose an expert and meet online.
No packages or subscriptions, pay only for the time you need.