(original) (raw)
On Thu, May 28, 2009 at 01:56, Florian Weimer <fweimer@bfk.de> wrote:
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.
�
Martin
* Michael McMahon:
I've always assumed that the ProcessBuilder requirements could be
\> webrev location: http://cr.openjdk.java.net/\~michaelm/5049299/webrev.00/
\>
\> \*\*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,
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.
�
Martin
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@bfk.de>
BFK edv-consulting GmbH � � � http://www.bfk.de/
Kriegsstra�e 100 � � � � � � �tel: +49-721-96201-1
D-76133 Karlsruhe � � � � � � fax: +49-721-96201-99