Bug #44908 [NoF->Wfx]: stream_select on pipes returned by proc_open returns streams that are not ready

From: Date: Mon, 29 Sep 2014 14:49:27 +0000
Subject: Bug #44908 [NoF->Wfx]: stream_select on pipes returned by proc_open returns streams that are not ready
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187752@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=44908&edit=1 ID: 44908 Updated by: ab@php.net Reported by: mike at silverorange dot com Summary: stream_select on pipes returned by proc_open returns streams that are not ready -Status: No Feedback +Status: Wont fix Type: Bug Package: Streams related Operating System: * PHP Version: 5.2CVS-2008-09-08 Block user comment: N Private report: N New Comment: see bug #47918 Previous Comments: ------------------------------------------------------------------------ [2014-09-29 14:47:50] ab@php.net Related To: Bug #47918 ------------------------------------------------------------------------ [2013-05-03 11:03:52] ab@php.net Related To: Bug #64770 ------------------------------------------------------------------------ [2009-02-07 11:01:37] ondraster at gmail dot com function loadModule ( $moduleName ) { $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "errors.txt", "a") ); $module = proc_open ( 'I:\httpd\php\php.exe I:\httpd\php-irc-bot\module.' . $moduleName . '.php', $descriptorspec, $pipes, NULL, array ( 'RUNFIRST' => true ) ); $this -> runningModules[$moduleName] = $module; echo "Registered new module: $moduleName\r\n"; $this -> pipes[$moduleName] = $pipes; } ... few code ... foreach ( $this -> pipes as $module => $pipes ) { fwrite ( $pipes[0], $msg ); $forChange[] = $pipes[1]; } $r = NULL; $e = NULL; $sock_change = stream_select ( $forChange, $r, $e, 0, 20 ); if ( $sock_change > 0 && $sock_change !== false ) { foreach ( $forChange as $key => $stream ) { echo fread ( $stream, 4096 ); } } PHP 5.2.2, 5.2.8, 5.3 (Windows Vista 64bit, x86 build, running from CLI) still not working. After 3/4 of year still not fixed. PHP6 says some warnings, never seen before ("Cannot cast a filtered stream on this system", complete errors: http://clip2net.com/clip/m12051/1233956312-clip-16kb.png ------------------------------------------------------------------------ [2008-12-03 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2008-11-25 03:57:58] lbarnaud@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=44908 -- Edit this bug report at https://bugs.php.net/bug.php?id=44908&edit=1

« previous php.bugs (#187752) next »