I did something similar some time ago, but in far simpler form. I called it &quot;process race&quot; - prace for short.<p>Basically you write simple shell script to start your processes and at the and you exec prace so it takes over children of shell:<p><pre><code>  #!&#x2F;bin&#x2F;sh
  proc1 &amp;
  proc2 &amp;
  proc3 &amp;
  exec prace
</code></pre>
You could also do this as a part of shell script in this way:<p><pre><code>  (proc1 &amp; proc2 &amp; proc3 &amp; exec prace)
</code></pre>
Then prace has simple job. It wait(2)s and then kills all children.<p>I have it somewhere if someone is interested, but I can access it in few hours. But everything is written in at most 2&#x2F;3 terminal screens worth of C.