aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/process.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-13 05:08:30 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-14 06:23:37 +0200
commit27fd6f9615f36aec71877e2b99aa3655e22da75d (patch)
tree61fad1a87ed71a594a12682e2bf50801c27c8460 /src/process.c
parentcmake: fix grammar in option description (diff)
downloadcimple-27fd6f9615f36aec71877e2b99aa3655e22da75d.tar.gz
cimple-27fd6f9615f36aec71877e2b99aa3655e22da75d.zip
minor refactoring
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c3
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;