At 18:18 30/05/2003, Wez Furlong wrote:
For exec() and system(), we don't send any input and only capture
stdout.  So, everything except the stdout fileno can be closed-on-exec.
The user can do the usual 2>&1 trick to get the stderr output as we run
their command using the shell.

Unless I'm missing something, the post I sent illustrates an example where a file descriptor other than 0/1/2 is being used to communicate between the parent process and the child process. I don't think that close-on-exec on the fd's before exec() is any different than simply close()ing before we exec(), so I think that this five year old issue would surface if we go for that solution.
Back then, we couldn't come up with a good solution for this issue, and we simply disabled closing fd's on exec. We could alter this behavior to be optional, through php.ini, and yes, I don't particularly like this solution either, but I don't have any better in mind right now...


Zeev


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to