Prototype of the second approach for terminating a tree of processes using
pkill. Not automated yet, commit as a proof of concept.