From b4a3a3e367d36abf78ad1d6c5954714d64f21ee3 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 1 Dec 2009 16:31:04 +0000 Subject: [PATCH] * fhandler_registry.cc (fhandler_registry::open): Mark /proc/registry directory and siblings as nohandle fhandler. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_registry.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index effa8386b..4be550ce5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-12-01 Corinna Vinschen + + * fhandler_registry.cc (fhandler_registry::open): Mark /proc/registry + directory and siblings as nohandle fhandler. + 2009-11-30 Christopher Faylor * speclib: Use last dll found since that's the real name of the cygwin diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 904184e63..bb0ea048c 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -664,6 +664,8 @@ fhandler_registry::open (int flags, mode_t mode) else { flags |= O_DIROPEN; + /* Marking as nohandle allows to call dup. */ + nohandle (true); goto success; } }