* 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.
This commit is contained in:
Christopher Faylor
2011-05-06 20:12:20 +00:00
parent b66dba56c5
commit f4c566233f
3 changed files with 14 additions and 5 deletions

View File

@ -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,