summaryrefslogtreecommitdiff
path: root/Libraries/LibCore
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-30 09:52:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-30 09:52:07 +0200
commit36a5e0be4b4fec2a091363c8bc3c9a53e159157a (patch)
tree2a688c8cf068aaa72b8cde5a8c31e2ba1ad4ee6f /Libraries/LibCore
parent8fc6ff94fea7b4fa77bb5cf0baff72ad90bb84f5 (diff)
downloadserenity-36a5e0be4b4fec2a091363c8bc3c9a53e159157a.zip
LibCore: Don't continue in forked child if exec() fails
Fixes #1854.
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r--Libraries/LibCore/DesktopServices.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibCore/DesktopServices.cpp b/Libraries/LibCore/DesktopServices.cpp
index ecfb6b61f2..3804dc62f0 100644
--- a/Libraries/LibCore/DesktopServices.cpp
+++ b/Libraries/LibCore/DesktopServices.cpp
@@ -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();
}