diff options
author | Christopher Faylor <me@cgf.cx> | 2001-07-21 03:20:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-07-21 03:20:01 +0000 |
commit | a7670c1e828fd3f628aee3c6d77b9c40bf429b0c (patch) | |
tree | e25595b7055f68babbec00191ff0c6804c1ffa94 /winsup/cygwin/dtable.cc | |
parent | b34f1c9f7b31a65b9e7ef5cd049f8b2403787553 (diff) | |
download | cygnal-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.tar.gz cygnal-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.tar.bz2 cygnal-a7670c1e828fd3f628aee3c6d77b9c40bf429b0c.zip |
* 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/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 4fb726e4d..a5477eb98 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -337,6 +337,7 @@ dtable::dup_worker (fhandler_base *oldfh) newfh->set_close_on_exec_flag (0); MALLOC_CHECK; + debug_printf ("duped '%s' old %p, new %p", oldfh->get_name (), oldfh->get_io_handle (), newfh->get_io_handle ()); return newfh; } @@ -534,7 +535,9 @@ dtable::vfork_child_dup () for (size_t i = 0; i < size; i++) if (not_open (i)) continue; - else if ((newtable[i] = dup_worker (fds[i])) == NULL) + else if ((newtable[i] = dup_worker (fds[i])) != NULL) + newtable[i]->set_close_on_exec (fds[i]->get_close_on_exec ()); + else { res = 0; set_errno (EBADF); @@ -568,6 +571,7 @@ dtable::vfork_child_fixup () { if (!fds_on_hold) return; + debug_printf ("here"); fhandler_base **saveme = fds; fds = fds_on_hold; |