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
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:59:05 +0200
commit4ca4f6ccba9a4f6d1f3dda848934d8fc0af1de21 (patch)
tree09fe78da2f9145ad2a3a08ae51a505e1717a953f /src/basic/exec-util.c
parentac0b078399d2c59fa50c197c7370e45a37d76d6b (diff)
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 246cc4f4f..336bb7ca5 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);
}