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
commit 36a5e0be4b
Notes: sideshowbarker 2024-07-19 07:10:04 +09:00

View file

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