summaryrefslogtreecommitdiff
path: root/src/basic/exec-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-25 21:07:18 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-26 15:47:12 +0100
commit3554ef51771b472145e4f7376943e7209e8a2864 (patch)
tree1f93c30fcc06227377a1c1f1c04ecf7d1ce68a27 /src/basic/exec-util.c
parent00d4b1e684a84cf87f5694f30ad69afc19ada166 (diff)
downloadsystemd-3554ef51771b472145e4f7376943e7209e8a2864.tar.gz
basic/exec-util: use _exit() to return from child
Diffstat (limited to 'src/basic/exec-util.c')
-rw-r--r--src/basic/exec-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c
index 0829b3d836..d20e09dc54 100644
--- a/src/basic/exec-util.c
+++ b/src/basic/exec-util.c
@@ -65,7 +65,7 @@ static int do_spawn(const char *path, char *argv[], int stdout_fd, pid_t *pid) {
/* If the fd happens to be in the right place, go along with that */
if (stdout_fd != STDOUT_FILENO &&
dup2(stdout_fd, STDOUT_FILENO) < 0)
- return -errno;
+ _exit(EXIT_FAILURE);
(void) fd_cloexec(STDOUT_FILENO, false);
}