#36458 [Opn]: function sleep accept negative value
| From: | quick_defect at yahoo dot com | Date: | Tue, 21 Feb 2006 08:19:01 +0000 |
| Subject: | #36458 [Opn]: function sleep accept negative value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93461@lists.php.net to get a copy of this message | ||
ID: 36458
User updated by: quick_defect at yahoo dot com
Reported By: quick_defect at yahoo dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: redhat
PHP Version: 5.1.2
New Comment:
But I see that the behavior of function usleep reasonable this time:
warning messages are given and exit endless sleep.But why function
sleep remains? PLS fix it.
Previous Comments:
------------------------------------------------------------------------
[2006-02-21 09:14:04] quick_defect at yahoo dot com
Nothing diffrent...the same as before
------------------------------------------------------------------------
[2006-02-20 08:20:25] derick@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-02-20 04:24:46] quick_defect at yahoo dot com
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 this bug report at http://bugs.php.net/?id=36458&edit=1