Re:You don't need to daemonize
by thwarted on Sunday June 28, 2015 @09:34PM
(#9795982)
One little known feature added in Linux 3.4 is the PR_SET_CHILD_SUBREAPER prctl(2) [0] that lets you designate the process as being a "subreaper" and it will be notified of any descending subprocess exits, just like init would be.
[0] http://man7.org/linux/man-pages/man2/prctl.2.html