#37074 [Opn]: pclose returns -1 (some times)

From: Date: Thu, 13 Apr 2006 19:28:29 +0000
Subject: #37074 [Opn]: pclose returns -1 (some times)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95769@lists.php.net to get a copy of this message
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

« previous php.bugs (#95769) next »