|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-04-03 11:40 UTC] mike@php.net
-Status: Open
+Status: Not a bug
[2014-04-03 11:40 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 04:00:02 2025 UTC |
Description: ------------ If you open a program with proc_open and you connect both stdout and stderr of that program to a pty, the same pty is used. If you use select_stream on both stdout and stderr, select marks both as ready and you can not distinguish which one hash data as you can read from both resources. Test script: --------------- $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pty"), 2 => array("pty"), ); $proc = proc_open("programpath", $descriptorspec, $handles = array()); stream_select($read = array($handles[1], $handles[2]), $write = null, $urgent = null, $timeout = 10); // $read now contains $handles[1] AND $handles[2], does not matter where the data was written to