ID:               49694
 User updated by:  compconsultant at yahoo dot com
 Reported By:      compconsultant at yahoo dot com
-Status:           No Feedback
+Status:           Open
 Bug Type:         Streams related
 Operating System: Centos 5.3
 PHP Version:      5.2.11
 New Comment:

NO feedback was provide by the php team, not me for over a week. As 
reported, the bug still exists and still does not work.


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

[2009-10-06 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".

------------------------------------------------------------------------

[2009-10-05 14:54:17] compconsultant at yahoo dot com

Same result, no difference, no "ok" displayed

------------------------------------------------------------------------

[2009-09-28 06:58:38] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[2009-09-27 22:57:05] compconsultant at yahoo dot com

Description:
------------
Using proc_open to open a pipe to a command, and, putting stream_select

into a function, hangs upon return from that function.  

Reproduce code:
---------------
<?php
        function SelectStream($StreamsArray) {
                $Null = array();
                $timeout = NULL;
                stream_select($StreamsArray, $Null, $Null, $timeout);
                echo "After select\n";
                return FALSE;
        }
$ProcDescriptor = array(1 => array("pipe", "w"));
$Resource = proc_open("tail -F /var/log/mail.log", $ProcDescriptor,
$Pipes, NULL, NULL, array("binary_pipes" => TRUE));
if ($Resource === FALSE) die("proc_open failed\n");
$ProgResource = $Pipes[1];
/*
$ProgResource = popen("tail -F /var/log/mail.log", "r");
if ($ProgResource === FALSE) die("Could not open the PIPE\n");
*/
$Streams[] = $ProgResource;
$Resource = SelectStream($Streams);
echo "ok\n";
?>

Expected result:
----------------
I expect ok to be displayed. If you replace proc_open with popen 
(uncomment the lines), the same function returns fine (ok displayed).
If 
you remove the stream_select, it also returns fine. 

Actual result:
--------------
The string ok is not displayed, the statement is never reached. After 
select is displayed. So, it is hanging on the return statement.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49694&edit=1

Reply via email to