From: excurso Date: Mon, 4 Aug 2025 19:38:47 +0000 (+0000) Subject: Unix processes / IPC / Utilize pipes with "close-on-exec" flag set X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3112176e7575ea96ed2235a40186614fe912647;p=thirdparty%2Ftor.git Unix processes / IPC / Utilize pipes with "close-on-exec" flag set --- diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c index 7fec97939f..f708eafb68 100644 --- 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,