From e0e167e5812287a7944fa21f2515b61b08c67b1f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 2 Mar 2021 12:19:43 +0100 Subject: Print error code if CreateMutex() fails This issue came up recently in a bug report[1]; without the error code, users can barely guess why the function failed. [1] Closes GH-6745. --- ext/opcache/shared_alloc_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index a75ec852c4..4b95508ef4 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -80,7 +80,7 @@ void zend_shared_alloc_create_lock(void) { memory_mutex = CreateMutex(NULL, FALSE, create_name_with_username(ACCEL_MUTEX_NAME)); if (!memory_mutex) { - zend_accel_error(ACCEL_LOG_FATAL, "Cannot create mutex"); + zend_accel_error(ACCEL_LOG_FATAL, "Cannot create mutex (error %u)", GetLastError()); return; } ReleaseMutex(memory_mutex); -- cgit v1.2.1