|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-28 00:35 UTC] pollita@php.net
[2005-04-28 07:45 UTC] lew at mailduct dot com
[2005-05-27 00:04 UTC] lew at mailduct dot com
[2005-07-28 20:26 UTC] lew at mailduct dot com
[2005-07-29 01:56 UTC] sniper@php.net
[2005-11-07 00:02 UTC] sniper@php.net
[2005-11-14 01:00 UTC] php-bugs at lists dot php dot net
[2008-10-20 20:02 UTC] estoesunapija at hotmail dot com
[2008-10-20 22:12 UTC] lbarnaud@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ Timeouts are ignored in stream_select. Instead, it always returns with "1" as the number of streams affected, ignoring any timeout seconds that are set. This is true regardless of stream_set_blocking settings. This may or may not be related to my reported FEOF problems: pr #25649 (Sep 2003) pr #32858 (Apr 2005) Reproduce code: --------------- $fp = fopen( '/var/log/maillog','r' ); ## Tried both ways, got same results #stream_set_blocking( $fp,TRUE ); #stream_set_blocking( $fp,FALSE ); $r = array( $fp ); while( TRUE ) { $n = stream_select( $r,$w=NULL,$e=NULL,30 ); if( $n===FALSE ) echo "stream_select = FALSE\n"; else echo "stream_select = $n\n"; echo fgets($fp); print( '.' ); } Expected result: ---------------- Assuming no other program is writing to /var/log/maillog, I expect to see a timeout condition every 30 seconds, as such: stream_select = FALSE Actual result: -------------- Instead, I see iterations of: stream_select = 1 as fast as the system can execute the loop.