ID:               37074
 User updated by:  mauroi at digbang dot com
 Reported By:      mauroi at digbang dot com
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: CentOS release 4.2
 PHP Version:      5.1.2
 New Comment:

Forgot to mention.
I doesn't happen in Windows.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to