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.
--Wez. On Fri, 30 May 2003, Zeev Suraski wrote: > At 18:02 30/05/2003, Wez Furlong wrote: > >I *think* that in the case of Brian's question (which applies to the > >exec(), system() and so on family of PHP functions), we can safely loop > >throught the descriptors (except for those we will be using to capture > >or pass-thru the output) and set the close-on-exec flag prior to > >forking. > > Yep, but how do you know which ones are the ones you shouldn't touch? > > Zeev > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
