1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibCore: Don't continue in forked child if exec() fails

Fixes #1854.
This commit is contained in:
Andreas Kling 2020-04-30 09:52:07 +02:00
parent 8fc6ff94fe
commit 36a5e0be4b

View file

@ -55,7 +55,7 @@ bool spawn(String executable, String argument)
if (child_pid == 0) {
if (execl(executable.characters(), executable.characters(), argument.characters(), nullptr) < 0) {
perror("execl");
return false;
exit(1);
}
ASSERT_NOT_REACHED();
}