mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
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:
committed by
Ryan Foster
parent
4efc6bf0d8
commit
5c448452cf
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user