From 5c448452cfd78fdc8d5c3562f37f0676bfacdf20 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Mon, 31 Mar 2025 21:25:04 +0900 Subject: [PATCH] libobs/util: Prevent locking mutex in child process when checking Qt5 The frontend has set a log handler which locks the mutex in `LogString`. If `os_dlopen` fails in the child process, it calls `blog` and attempted to lock the mutex that may have already been locked by another thread before `fork()`. This change prevents the child process from locking the mutex, resolving the potential deadlock. --- libobs/util/platform-nix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c index 6951df7a0..84e929fed 100644 --- a/libobs/util/platform-nix.c +++ b/libobs/util/platform-nix.c @@ -134,6 +134,7 @@ bool has_qt5_dependency(const char *path) { pid_t pid = fork(); if (pid == 0) { + base_set_log_handler(NULL, NULL); _exit(module_has_qt5_check(path)); } if (pid < 0) {