Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-07-21 07:20:01 +0400
committerChristopher Faylor <me@cgf.cx>2001-07-21 07:20:01 +0400
commita7670c1e828fd3f628aee3c6d77b9c40bf429b0c (patch)
treee25595b7055f68babbec00191ff0c6804c1ffa94 /winsup/cygwin/fhandler.cc
parentb34f1c9f7b31a65b9e7ef5cd049f8b2403787553 (diff)
* cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.
* dtable.cc (dtable::dup_worker): Add debugging output. (dtable::vfork_child_dup): Correctly set close_on_exec. * fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if there is no need to get it from the parent. * fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 65ef21411..e30348ac8 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1542,7 +1542,9 @@ fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *namep
void
fhandler_base::fork_fixup (HANDLE parent, HANDLE &h, const char *name)
{
- if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !get_close_on_exec (),
+ if (!get_close_on_exec ())
+ debug_printf ("handle %p already opened", h);
+ else if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !get_close_on_exec (),
DUPLICATE_SAME_ACCESS))
system_printf ("%s - %E, handle %s<%p>", get_name (), name, h);
}