ID: 37074 Updated by: [EMAIL PROTECTED] Reported By: mauroi at digbang dot com -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: CentOS release 4.2 PHP Version: 5.1.2 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-04-13 19:28:29] mauroi at digbang dot com Forgot to mention. I doesn't happen in Windows. ------------------------------------------------------------------------ [2006-04-13 19:26:59] mauroi at digbang dot com Description: ------------ With the following script (in CLI), sometimes I get -1 and sometimes 0. The report it's very similar to #8992, but with proc_close. With out withoud --enable-sigchild. Thanks in advance. Reproduce code: --------------- <? $cmd = "ls"; if ($process = popen($command, 'r')) { $output = stream_get_contents($process); $returnCode = pclose($process); } echo $returnCode . "\n"; ?> Expected result: ---------------- 0 Actual result: -------------- -1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37074&edit=1