#35900 [Csd]: stream_select() should warning when tv_sec is negative

From: Date: Wed, 19 Apr 2006 08:36:19 +0000
Subject: #35900 [Csd]: stream_select() should warning when tv_sec is negative
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95975@lists.php.net to get a copy of this message
ID: 35900 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Closed Bug Type: Streams related Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: hi. I have tried it with the snapshot version and found that it's actully not fixed correctory.. file: streamsfuncs.c line: 757 if(sec<0)..... while sec here is a address, so it should be: if (Z_LVAL(*sec) < 0)....... Previous Comments: ------------------------------------------------------------------------ [2006-02-23 19:28:44] iliaa@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2006-02-23 03:26:33] sqchen at citiz dot net sorry for my late response, I have tried the cvs version http://snaps.php.net/php5.1-latest.tar.gz, and the problem remains as before ------------------------------------------------------------------------ [2006-01-15 01:00:03] 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". ------------------------------------------------------------------------ [2006-01-05 10:05:56] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-01-05 03:39:51] sqchen at citiz dot net Description: ------------ int stream_select ( array &read, array &write, array &except, int tv_sec [, int tv_usec] ) when tv_sec= -1, tv_usec=6000000, it should warning, not wait 5 seconds. Reproduce code: --------------- <?php $read = array(STDIN); if($num_changed_streams = stream_select($read, $write=NULL , $except = NULL, -1,6000000)) { echo "Pass"; } else { echo "Fail"; } ?> Expected result: ---------------- warning: Invalid argument (max_fd=0) Actual result: -------------- wait 5 seconds for input ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35900&edit=1

« previous php.bugs (#95975) next »