ID:               25933
 Updated by:       [EMAIL PROTECTED]
 Reported By:      flape at pobox dot sk
-Status:           Bogus
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Win2K
 PHP Version:      4.3.3
 New Comment:

It should work with file handles.
Try removing the stream_set_blocking() call: stream_select() will give
you an indication if an operation would block - if it is set to
non-blocking, it is possible that your OS is telling you it has nothing
to do.



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

[2003-11-03 07:44:41] flape at pobox dot sk

According to the definition of a stream - in the very first paragraf of
the topic Strem functions - the file is stream too, so the
stream_select function should be able to handle the file handle too.

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

[2003-10-30 21:07:03] [EMAIL PROTECTED]

What use would this be with file handles? Not bug.


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

[2003-10-21 08:30:43] flape at pobox dot sk

Description:
------------
stream_select aplied on a file handle - that is told to be a stream too
- emiadelly returns.

Reproduce code:
---------------
<?
$fh = fopen('debug.txt','r+');
stream_set_blocking($fh ,false);
$ra = array($fh);
while(true){  
  while(0 == stream_select($ra,$w = NULL,$e = NULL,20))
  $text = fgets($fh,10);
  echo $text;

  flush();
  ob_flush();

}
fclose($fh);
?>


Expected result:
----------------
It should prit the context of debug.txt and everithing what was added
to that file after starting the script.

Actual result:
--------------
Warning: stream_select(): unable to select [0]: No error in
c:\temp\htdocs\debug.php on line 7


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


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

Reply via email to