Skip to content

Commit e0e167e

Browse files
committed
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.
1 parent 51e2015 commit e0e167e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/shared_alloc_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void zend_shared_alloc_create_lock(void)
8080
{
8181
memory_mutex = CreateMutex(NULL, FALSE, create_name_with_username(ACCEL_MUTEX_NAME));
8282
if (!memory_mutex) {
83-
zend_accel_error(ACCEL_LOG_FATAL, "Cannot create mutex");
83+
zend_accel_error(ACCEL_LOG_FATAL, "Cannot create mutex (error %u)", GetLastError());
8484
return;
8585
}
8686
ReleaseMutex(memory_mutex);

0 commit comments

Comments
 (0)