Daniel Colascione submitted some code to support processes knowing when others have terminated. Normally a process can tell when its own child processes have ended, but not unrelated processes, or at ...
Just to make sure you're aware, the 'f' flag to ps will give you a 'forest'-type diagram of process parent/child relationships. Taking a quick glance through /proc, it looks like you have to loop ...