Bug #60483 [NEW]: stream_select only selects STDIN if present in read array
| From: | vmiszczak at ankama dot com | Date: | Fri, 09 Dec 2011 15:25:30 +0000 |
| Subject: | Bug #60483 [NEW]: stream_select only selects STDIN if present in read array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-165780@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux/Debian x64
PHP version: 5.3.8
Package: Streams related
Bug Type: Bug
Bug description:stream_select only selects STDIN if present in read array
Description:
------------
I'm writing a data multiplexer PHP CLI script that takes data from STDIN
and
dispatchs
those data on programs opened with proc_open().
I'm using stream_select() to see which descriptor has data. The read array
I'm
using contains STDIN and the output streams from programs opened with
proc_open()
(the classic $pipes[1] from proc_open() descriptorspec). Those programs
write on
their stdout as soon as there is data on their stdin (actually those
programs are
PHP scripts echoing input). If STDIN remains in the read set, stream_select
returns only STDIN as readable and never returns any of the programs output
streams.
As soon as STDIN is removed from the read set, stream_select behave normaly
and
selects the output streams that are ready.
Expected result:
----------------
I'm expecting all my ready streams to be returned, even if STDIN is present
in the
set.
--
Edit bug report at https://bugs.php.net/bug.php?id=60483&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60483&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60483&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60483&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60483&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60483&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60483&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60483&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60483&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60483&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60483&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60483&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60483&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60483&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60483&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60483&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60483&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60483&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60483&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60483&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60483&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60483&r=mysqlcfg