mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Use _exit instead of exit if exec() fails after forking
* Otherwise if we call exit() it can ruin the parent process by calling atexit(), signal handlers, and other things.
This commit is contained in:
@@ -369,10 +369,8 @@ static pid_t RunProcess(const char *app, const char *workingDir, const char *cmd
|
||||
|
||||
chdir(workDir.c_str());
|
||||
execve(appPath.c_str(), argv, envp);
|
||||
RDCERR("Failed to execute '%s' %s", appName.c_str(), strerror(errno));
|
||||
RDCERR("Full Path: '%s'", appPath.c_str());
|
||||
|
||||
exit(0);
|
||||
fprintf(stderr, "exec failed\n");
|
||||
_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user