2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

check_iolog_mkpath: fix exit value

This commit is contained in:
Todd C. Miller
2023-01-03 14:02:23 -07:00
parent 6f94854673
commit bfd7d586b5

View File

@@ -97,8 +97,17 @@ main(int argc, char *argv[])
}
/* Clean up (avoid running via shell) */
execvp("rm", (char **)rmargs);
wait(&status);
switch (fork()) {
case -1:
sudo_warn("fork");
_exit(1);
case 0:
execvp("rm", (char **)rmargs);
_exit(1);
default:
wait(&status);
break;
}
return errors;
}