Use _exit() instead of exit() in child process

exit() should not be called from within a child process, since it would
call functions registered with atexit(), and flush stdio streams. Use
_exit() instead.
hidpi
Romain Vimont 7 years ago
parent 07b3918129
commit a919944372

@ -14,7 +14,7 @@ pid_t cmd_execute(const char *path, const char *const argv[]) {
if (pid == 0) {
execvp(path, (char *const *)argv);
perror("exec");
exit(1);
_exit(1);
}
return pid;
}

Loading…
Cancel
Save