diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-07 00:12:20 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-07 00:12:20 +0400 |
commit | f4c566233f28f747fce3c21031f6f3d47a0a6643 (patch) | |
tree | 7d159d3990ea04f5dedfcc83343f176129ebd201 /winsup/cygwin/fhandler.cc | |
parent | b66dba56c5f076c992f9dfc0f8f9dae29d1e9500 (diff) |
* fhandler.cc (fhandler_base::dup): Avoid duping a handle when an fhandler has
an archetype.
* fhandler_console.cc (fhandler_console::invisible_console): Move to the top.
(fhandler_console::set_close_on_exec): Don't set close-on-exec on handle since
it's an archetype and you don't know how many things could be using it.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 304feed63..f96d537ef 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1246,7 +1246,7 @@ fhandler_base::dup (fhandler_base *child) debug_printf ("in fhandler_base dup"); HANDLE nh; - if (!nohandle ()) + if (!nohandle () && !archetype) { if (!DuplicateHandle (GetCurrentProcess (), get_handle (), GetCurrentProcess (), &nh, |