chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac0b078
)
basic/exec-util: use _exit() to return from child
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sun, 25 Feb 2018 20:07:18 +0000
(21:07 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:05 +0000
(07:59 +0200)
src/basic/exec-util.c
patch
|
blob
|
history
diff --git
a/src/basic/exec-util.c
b/src/basic/exec-util.c
index 246cc4f4f844fbb1a370a992975c9037c4f46e5e..336bb7ca555a7418b2b0e56ea4e6bf35fea9f5e6 100644
(file)
--- 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);
}