in reply to Killing a process and, recursively, all its children

I've not tried this but "man kill" says:

Negative PID values may be used to choose whole process groups; see the PGID column in ps command output

perldoc -f kill:

...
Unlike in the shell, if SIGNAL is negative, it kills process groups instead of processes. (On System V, a negative PROCESS number will also kill process groups, but that's not portable.)...

  • Comment on Re: Killing a process and, recursively, all its children