diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2021-03-02 12:19:43 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2021-03-05 15:06:18 +0100 |
commit | e0e167e5812287a7944fa21f2515b61b08c67b1f (patch) | |
tree | 0f93d0f85b8efcd7851ebeba717847c34eb883fd | |
parent | 51e2015af3fc4757a666736aae7899a43f76ae6d (diff) | |
download | php-git-e0e167e5812287a7944fa21f2515b61b08c67b1f.tar.gz |
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] <https://bugs.php.net/80812>
Closes GH-6745.
-rw-r--r-- | ext/opcache/shared_alloc_win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |