From 4cc465db9aff266f1a0c20ae6ef4fcf0187480ea Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 17 Nov 2011 22:08:14 +0000 Subject: [PATCH] * shared.cc (shared_info::create): Open global shared data section non-inheritable to avoid accumulating stray handles in child processes. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/shared.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 89a485b30..575282657 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-11-17 Corinna Vinschen + + * shared.cc (shared_info::create): Open global shared data section + non-inheritable to avoid accumulating stray handles in child processes. + 2011-11-15 Christopher Faylor * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index b98c13651..70356b7e5 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -398,7 +398,8 @@ shared_info::create () CYGWIN_VERSION_SHARED_DATA, cygwin_shared_h, sizeof (*cygwin_shared), - SH_CYGWIN_SHARED); + SH_CYGWIN_SHARED, + &sec_all_nih); cygwin_shared->initialize (); }