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:
parent
4efc6bf0d8
commit
5c448452cf
1 changed files with 1 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue