From:             sqchen at citiz dot net
Operating system: redhat 7.3
PHP version:      5.1.1
PHP Bug Type:     Unknown/Other Function
Bug description:  stream_select() should warning when tv_sec is negative

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 bug report at http://bugs.php.net/?id=35900&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35900&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35900&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35900&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35900&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35900&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35900&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35900&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35900&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35900&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35900&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35900&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35900&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35900&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35900&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35900&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35900&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35900&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35900&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35900&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35900&r=mysqlcfg

Reply via email to