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.
This commit is contained in:
Norihiro Kamae
2025-03-31 21:25:04 +09:00
committed by Ryan Foster
parent 4efc6bf0d8
commit 5c448452cf
+1
View File
@@ -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) {