ID: 27356 User updated by: alpha at rrs dot at Reported By: alpha at rrs dot at -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Unix PHP Version: 4.3.4 New Comment:
Seems like the bug got fixed in CVS last week by andrey: http://cvs.php.net/php-src/ext/standard/basic_functions.c As it seems like noone'll find my bug (see #27841) I'll close it myself. Previous Comments: ------------------------------------------------------------------------ [2004-02-22 19:18:12] alpha at rrs dot at Description: ------------ The C function sleep() is defined as: unsigned int sleep(unsigned int seconds); In PHP it is defined as: void sleep ( int seconds) The Problem is when using a CLI with a signal handler sleep() ends immediately but doesn't return the unslept seconds, thus it's not possible to resleep. Checked current CVS via cvs.php.net and there is still no return value. So it's not a documentation problem. Reproduce code: --------------- php -r "var_dump(sleep(10));" Expected result: ---------------- int(0) or unslept seconds if a signal was handled Actual result: -------------- NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27356&edit=1