Adding robustness to building process trees
The ptrace(2) man page shows how one can subscribe for events such as PTRACE_EVENT_FORK or PTRACE_EVENT_VFORK type events that happens when a process calls fork()/vfork(). At such an event one can then call ptrace(PTRACE_GETEVENTMSG,…) to retrieve the pid of the … Continue reading →