#36458 [NEW]: function sleep accept negative value
| From: | quick_defect at yahoo dot com | Date: | Mon, 20 Feb 2006 03:24:47 +0000 |
| Subject: | #36458 [NEW]: function sleep accept negative value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-93427@lists.php.net to get a copy of this message | ||
From: quick_defect at yahoo dot com
Operating system: redhat
PHP version: 5.1.2
PHP Bug Type: Unknown/Other Function
Bug description: function sleep accept negative value
Description:
------------
First,if given negative value, I have to interrupt the execution of
scripts because it sleep for very long time.(I did not exactly know how
long)
Second,if given a int which cause overflow, it also do not work very well.
Reproduce code:
---------------
sleep(-1);
$max=mt_getrandmax();
$of=-$max-2;
sleep($of);
Expected result:
----------------
exception or turn it to a legal value
Actual result:
--------------
sleep for a very long time
--
Edit bug report at http://bugs.php.net/?id=36458&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36458&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36458&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36458&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36458&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36458&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36458&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36458&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36458&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36458&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36458&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36458&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36458&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36458&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36458&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36458&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36458&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36458&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36458&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36458&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36458&r=mysqlcfg