Review request for 5049299 (original) (raw)

Michael McMahon Michael.McMahon at Sun.COM
Thu May 28 09🔞24 UTC 2009


Florian Weimer wrote:

* Michael McMahon:

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 posixspawn() 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 posixspawn and friends. Could you elaborate why this is not the case? 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. But you can't expect an arbitrary command (eg. "/bin/ls") to do any "reshuffling". It has to be done by something in between the parent and the target command.

The other problem, is the requirement to change working directory for the target. posix_spawn() doesn't allow this.

Just to be clear as well, posix_spawn() is being used (to avoid the fork() memory duplication issue) but it isn't able to complete the job which is why we need this extra helper (on Solaris).

Thanks, Michael.



More information about the core-libs-dev mailing list