Review request for 5049299

Martin Buchholz martinrb at
Thu May 28 17:56:00 UTC 2009

On Thu, May 28, 2009 at 01:56, Florian Weimer <fweimer at> wrote:

> * Michael McMahon:
> > webrev location:<>
> >
> > **I'd like to give an outline of the change here, to make reviewing
> > the webrev a bit easier.  Basically, while posix_spawn() is a fairly
> > elaborate and complicated system call, it can't quite do everything
> > that the old fork()/exec() combination can do,
> I've always assumed that the ProcessBuilder requirements could be
> fulfilled by posix_spawn and friends.  Could you elaborate why this is
> not the case?

You need to pass a list of file descriptor actions to posix_spawn,
but you cannot safely compute such a complete list of actions because
you are still in the parent when doing this.

The computation of the list of actions (closes and dups)
itself needs to be done in the child.


> The file descriptor setup race mentioned in the comments shouldn't
> apply, really--the reshuffling should occur in the child, isolated
> from the parent, otherwise the implementation is quite broken and
> pointless.
> --
> Florian Weimer                <fweimer at>
> BFK edv-consulting GmbH
> Kriegsstraße 100              tel: +49-721-96201-1
> D-76133 Karlsruhe             fax: +49-721-96201-99
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the core-libs-dev mailing list