Code review comment for lp:~goraxe/upstart/user_sid

Revision history for this message
Scott James Remnant (scott) wrote :

The init daemon waits for the child process to succeed in its exec() call
(or fail there on the way)

This is because the child process is a direct copy of the init daemon,
meaning all of the init daemon's memory becomes copy-on-write for the period
where the child exists. If pid 1 did not wait, performance would suffer
massively as processes endured page-fault after page-fault.

It's best to treat the code between the fork() and exec() as still running
in init context

On Wed, Apr 27, 2011 at 4:50 PM, goraxe <email address hidden> wrote:

> By the time the getpwnam() has been called, is it not already being
> performed in the child process? The execvp call just after the uid implies
> this. So the init daemon is not stalled by the blocking call but execution
> of the child could be. In that case a timeout death of the child proc would
> be acceptable if upstart then followed some retry logic.
> --
> https://code.launchpad.net/~goraxe/upstart/user_sid/+merge/59309
> Your team Upstart Developers is subscribed to branch lp:upstart.
>

« Back to merge proposal