mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-29 23:50:59 -06:00
Detect exec failure and unexpected crashes in child process
This commit is contained in:
parent
47948aa2d1
commit
e5566d31fb
@ -417,11 +417,19 @@ static void LinuxBreathOfTheWildWorkaround(VkInstance& instance, const VkInstanc
|
||||
{
|
||||
setenv("CEMU_DETECT_RADV","1", 1);
|
||||
execl("/proc/self/exe", "/proc/self/exe", nullptr);
|
||||
_exit(2); // exec failed so err on the safe side and signal failure
|
||||
}
|
||||
|
||||
int childStatus = 0;
|
||||
waitpid(childID, &childStatus, 0);
|
||||
|
||||
// if the process didn't exit cleanly or failed to determine LLVM status
|
||||
if (!WIFEXITED(childStatus) || WEXITSTATUS(childStatus) == 2)
|
||||
{
|
||||
cemuLog_log(LogType::Force, "BOTW/RADV workaround not applied because detecting LLVM presence failed unexpectedly");
|
||||
return;
|
||||
}
|
||||
|
||||
if (WEXITSTATUS(childStatus) == 1)
|
||||
cemuLog_log(LogType::Force, "BOTW/RADV workaround not applied because mesa was built without LLVM");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user