[Merge] lp:~stgraber/upstart/upstart-prctl into lp:upstart

Stéphane Graber stgraber at stgraber.org
Wed Nov 28 18:59:19 UTC 2012


The proposal to merge lp:~stgraber/upstart/upstart-prctl into lp:upstart has been updated.

Description changed to:

Add a call to prctl to set the init process as the subreaper.

This basically prevents any child process to double fork and get re-parented
to PID 1. Any process attempting a double fork will simply be re-parented to
the closest init process in the process tree.

This feature allows Session Inits to track the state of their children and
receive SIGCHLD for them when they die.

The PR_SET_CHILD_SUBREAPER flag was added in the 3.4 kernel.
In the event where the kernel doesn't support it, upstart will emit a prctl-subreaper-failed event as well as log a warning message.

On such system, tracking child process status won't be reliable and once we have the user jobs implemented, the respawn statement for those should be ignored when we can't setuup the subreaper as to avoid tracking problems, potentially leading to loops.

For more details, see:
https://code.launchpad.net/~stgraber/upstart/upstart-prctl/+merge/136759
-- 
https://code.launchpad.net/~stgraber/upstart/upstart-prctl/+merge/136759
Your team Upstart Reviewers is requested to review the proposed merge of lp:~stgraber/upstart/upstart-prctl into lp:upstart.



More information about the upstart-devel mailing list