Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piscisaureus/2024391 to your computer and use it in GitHub Desktop.
Save piscisaureus/2024391 to your computer and use it in GitHub Desktop.
From d79af7ad612f1d9620338ebdb72f407961f0bc1f Mon Sep 17 00:00:00 2001
From: Bert Belder <bertbelder@gmail.com>
Date: Mon, 12 Mar 2012 21:10:25 +0100
Subject: [PATCH 1/1] Make inherited pipe handles non-inheritable to child
processes.
---
src/win/pipe.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/win/pipe.c b/src/win/pipe.c
index 54d90e0..a685a95 100644
--- a/src/win/pipe.c
+++ b/src/win/pipe.c
@@ -1622,6 +1622,9 @@ void uv_pipe_open(uv_pipe_t* pipe, uv_file file) {
return;
}
+ /* Make the pipe handle non-inheritable. */
+ SetHandleInformation(os_handle, HANDLE_FLAG_INHERIT, 0);
+
uv_pipe_connection_init(pipe);
pipe->handle = os_handle;
--
1.7.9.msysgit.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment