diff options
-rw-r--r-- | src/libenvexec/cspawn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libenvexec/cspawn.c b/src/libenvexec/cspawn.c index 683a0a3..e5e0c4f 100644 --- a/src/libenvexec/cspawn.c +++ b/src/libenvexec/cspawn.c @@ -18,6 +18,10 @@ static inline void cspawn_child_exec (char const *prog, char const *const *argv, char const *const *envp, uint16_t flags, cspawn_fileaction const *fa, size_t n) { + if (flags & CSPAWN_FLAGS_SELFPIPE_FINISH) selfpipe_finish() ; + if (flags & CSPAWN_FLAGS_SIGBLOCKNONE) sig_blocknone() ; + if (flags & CSPAWN_FLAGS_SETSID) setsid() ; + for (size_t i = 0 ; i < n ; i++) { switch (fa[i].type) @@ -48,10 +52,6 @@ static inline void cspawn_child_exec (char const *prog, char const *const *argv, } } - if (flags & CSPAWN_FLAGS_SELFPIPE_FINISH) selfpipe_finish() ; - if (flags & CSPAWN_FLAGS_SIGBLOCKNONE) sig_blocknone() ; - if (flags & CSPAWN_FLAGS_SETSID) setsid() ; - exec_ae(prog, argv, envp) ; } |