tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit f3112176e7575ea96ed2235a40186614fe912647
parent 13f780ac4cd637b890a3c9799176f51a0e71ea45
Author: excurso <w.zimpel@dev.utilizer.de>
Date:   Mon,  4 Aug 2025 19:38:47 +0000

Unix processes / IPC / Utilize pipes with "close-on-exec" flag set

Diffstat:
Msrc/lib/process/process_unix.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c @@ -49,6 +49,8 @@ #ifndef _WIN32 +#include "lib/fdio/fdio.h" + /** Internal state for Unix handles. */ struct process_unix_handle_t { /** Unix File Descriptor. */ @@ -137,7 +139,7 @@ process_unix_exec(process_t *process) unix_process = process_get_unix_process(process); /* Create standard in pipe. */ - retval = pipe(stdin_pipe); + retval = tor_pipe_cloexec(stdin_pipe); if (-1 == retval) { log_warn(LD_PROCESS, @@ -149,7 +151,7 @@ process_unix_exec(process_t *process) } /* Create standard out pipe. */ - retval = pipe(stdout_pipe); + retval = tor_pipe_cloexec(stdout_pipe); if (-1 == retval) { log_warn(LD_PROCESS, @@ -165,7 +167,7 @@ process_unix_exec(process_t *process) } /* Create standard error pipe. */ - retval = pipe(stderr_pipe); + retval = tor_pipe_cloexec(stderr_pipe); if (-1 == retval) { log_warn(LD_PROCESS,