From 4ca4f6ccba9a4f6d1f3dda848934d8fc0af1de21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 25 Feb 2018 21:07:18 +0100 Subject: [PATCH] basic/exec-util: use _exit() to return from child --- src/basic/exec-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2