Here's the deal, if your PHP install is --enable-sigchild, pclose() and proc_close() do NOT return a proper exit status code.

http://bugs.php.net/bug.php?id=29123

Currently illia at PHP.net are saying this WILL NOT be fixed until PHP 5.1 or so. Personally, I think this is bogus and SHOULD BE FIXED. I am sorry, but having accurate / agressive control over a child process and being able to retrive its exit status code is ESSENTIAL in a production environment. Perhaps if enough people post a high importance to this bug it will get fixed in the 4.x tree.

However, until the devs get it figured out, I would love to find a way around this. What I need to accomplish is gather and analyze progressive output from a child process and provide a customized tailable log of the process. Afterwards, I need to examine the exit status code for proper error handling. exec() and system() do not provide a progressive line-by-line return of the process. These results need to be logged in oracle (hence the --enable-sigchild) for statistics.

I would like to think that someone has found a semi-elegant way around this, since this bug has existed for so long: http://bugs.php.net/bug.php?id=14182

Thanks in advance for any help or insight to this,

Jt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to