#37354 [NEW]: sleep() does not work as expected

From: Date: Mon, 08 May 2006 00:09:38 +0000
Subject: #37354 [NEW]: sleep() does not work as expected
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96784@lists.php.net to get a copy of this message
From:             jbricci at gmail dot com
Operating system: Windows 2003 ISAPI
PHP version:      5.1.4
PHP Bug Type:     Unknown/Other Function
Bug description:  sleep() does not work as expected

Description:
------------
sleep() does not work as it did before...

sleep() now only seems to work up to a certain number of seconds, I
haven't figured what that number is. But if this now how sleep() will work
in PHP, could you please add the maximum value, (number of seconds allowed
to be used in sleep()) to the manual.

Reproduce code:
---------------
<?

// some ridiculous amount of time..

sleep ( 63166608000 );

?>

Expected result:
----------------
script should sleep...

Actual result:
--------------
script continues without sleeping, and triggers a warning, that makes no
sense at all. 

PHP Warning:  sleep() [<a href='function.sleep'>function.sleep</a>]:
Number of seconds must be greater than or equal to 0 in
x:\www\docs\run\load.php on line 4


PHP 5.1.3 and in older versions, sleep() would sleep, no matter how many
seconds were used! snaps.php.net (5.2.dev-latest, 6.0-dev-latest) also
seem to follow version 5.1.3 and older version, sleeping no matter how
many seconds are used in sleep()!


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


Thread (3 messages)

« previous php.bugs (#96784) next »