diff options
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index f38f4f5..c908f5c 100644 --- a/src/process.c +++ b/src/process.c @@ -85,10 +85,11 @@ static int redirect_and_exec_child(int pipe_fds[2], const char *args[], const ch int proc_capture(const char *args[], const char *envp[], struct proc_output *result) { + static const int flags = O_CLOEXEC; int pipe_fds[2]; int ret = 0; - ret = pipe2(pipe_fds, O_CLOEXEC); + ret = pipe2(pipe_fds, flags); if (ret < 0) { log_errno("pipe2"); return -1; |