From: Nikita Popov Date: Tue, 16 Jun 2020 12:51:58 +0000 (+0200) Subject: Remove debug code from usleep() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c207ebe6b4890fb974339e97f2479d5896b2497;p=php Remove debug code from usleep() This was added to debug CI failures, but ultimately didn't help understand the macos timing issues. Drop it now so it's not forgotten... --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 056bc0ac37..0a429963bd 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1242,7 +1242,6 @@ PHP_FUNCTION(sleep) Delay for a given number of micro seconds */ PHP_FUNCTION(usleep) { -#if HAVE_USLEEP zend_long num; ZEND_PARSE_PARAMETERS_START(1, 1) @@ -1253,12 +1252,9 @@ PHP_FUNCTION(usleep) zend_argument_value_error(1, "must be greater than or equal to 0"); RETURN_THROWS(); } - if (usleep((unsigned int)num) < 0) { -#if ZEND_DEBUG - php_error_docref(NULL, E_NOTICE, "usleep() failed with errno %d: %s", - errno, strerror(errno)); -#endif - } + +#if HAVE_USLEEP + usleep((unsigned int)num); #endif } /* }}} */