com php-src: Change the way timer queue timer is deleted: Zend/zend_execute_API.c
| From: | Anatol Belski | Date: | Wed, 13 Feb 2019 02:30:55 +0000 |
| Subject: | com php-src: Change the way timer queue timer is deleted: Zend/zend_execute_API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104613@lists.php.net to get a copy of this message | ||
Commit: 4f4cf9874d863f69782383e6c34d12eaf43fd2bc
Author: Anatol Belski <ab@php.net> Tue, 12 Feb 2019 18:30:55 -0800
Parents: b86d7738fb3bc0e0e491a7815f3e763d1464b9b1
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4f4cf9874d863f69782383e6c34d12eaf43fd2bc
Log:
Change the way timer queue timer is deleted
As discussed in bug #77580, passing INVALID_HANDLE_VALUE for the
completion event improves compatibility with Wine/ReactOS. The timer
callback itself is supposed to complete fast enough, no behavior change
is to expect.
Bugs:
https://bugs.php.net/77580
Changed paths:
M Zend/zend_execute_API.c
Diff:
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index f5d08f1..048e0af 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1238,7 +1238,7 @@ static void zend_set_timeout_ex(zend_long seconds, int reset_signals) /* {{{
*/
timer, so we could end up with just an ignored timeout.. Instead
delete and recreate. */
if (NULL != tq_timer) {
- if (!DeleteTimerQueueTimer(NULL, tq_timer, NULL)) {
+ if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) {
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not delete queued timer");
return;
@@ -1312,7 +1312,7 @@ void zend_unset_timeout(void) /* {{{ */
{
#ifdef ZEND_WIN32
if (NULL != tq_timer) {
- if (!DeleteTimerQueueTimer(NULL, tq_timer, NULL)) {
+ if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) {
EG(timed_out) = 0;
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not delete queued timer");