Toward race-free process signaling
Toward race-free process signaling
Posted Dec 8, 2018 3:00 UTC (Sat) by wahern (subscriber, #37304)In reply to: Toward race-free process signaling by kmeyer
Parent article: Toward race-free process signaling
A subreaper fulfills the role of init(1) for its descendant
processes. When a process becomes orphaned (i.e., its
immediate parent terminates) then that process will be
reparented to the nearest still living ancestor subreaper.
Subsequently, calls to getppid() in the orphaned process will
now return the PID of the subreaper process, and when the
orphan terminates, it is the subreaper process that will
receive a SIGCHLD signal and will be able to wait(2) on the
process to discover its termination status.