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

Stéphane Graber stgraber at stgraber.org
Mon Dec 10 15:09:04 UTC 2012


> On Fri, Dec 07, 2012 at 11:41:21AM -0000, James Hunt wrote:
> > My only worry is that if a user attempts to build this on a system whose
> > libc is too old, PR_SET_CHILD_SUBREAPER won't be defined.
> 
> FWIW, this definition comes from /usr/include/linux/prctl.h, which is a
> header from linux-libc-dev rather than from libc.  So I think only the
> kernel version is relevant here.

You're correct, I didn't look too closely for the source of the define.

Now for your other comment on relying on the prctl subreaper feature.
Yes, we'll be relying on that feature a fair bit for the user session, however after we discussed it with James and Dmitrijs, we came to the conclusion that we still need to allow starting a user session on a system that doesn't support it.

The biggest use case will be for people upgrading from 12.04's stock kernel to 14.04. On those systems, the current running kernel won't support prctl and we can't exclude that a user will attempt to open a user session before reboot.
That's why we came up with the warning+event fallback where if prctl isn't supported, we write a warning that'll ultimately end up in .xsession_errors and we emit the child-subreaper-failed event so that we can have jobs react on the missing feature and for example show a window telling the user about it and recommending a reboot.

In practice, running without prctl support will be identical to what you currently get when running upstart on the session bus as a user. Upstart can spawn jobs, can track their PID but can't know whether they stopped or need respawning. That's annoying but isn't much worse than what we have on the current gnome-session managed system, so I don't think preventing upstart from starting completely would be appropriate.
-- 
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