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

Stéphane Graber stgraber at stgraber.org
Wed Nov 28 18:58:37 UTC 2012


Stéphane Graber has proposed merging lp:~stgraber/upstart/upstart-prctl into lp:upstart.

Requested reviews:
  Upstart Reviewers (upstart-reviewers)

For more details, see:
https://code.launchpad.net/~stgraber/upstart/upstart-prctl/+merge/136759

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.
-- 
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 973 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20121128/5730b3a9/attachment.diff>


More information about the upstart-devel mailing list