From 5d5688f24188b8e34e8e82ab41fbb4cdb3f3e305 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 14 Jun 2012 17:28:03 +0200 Subject: [PATCH] unix: always set CLOEXEC flag for child process stdio FDs --- src/unix/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/process.c b/src/unix/process.c index 230afe99..4d54e043 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -237,6 +237,8 @@ static void uv__process_child_init(uv_process_options_t options, if (i != use_fd) { dup2(use_fd, i); close(use_fd); + } else { + uv__cloexec(use_fd, 0); } }