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>2012-04-18 09:57:38 +0400
committerChristopher Faylor <me@cgf.cx>2012-04-18 09:57:38 +0400
commit55dcba98dbd120db696fba3dda62a348599a2889 (patch)
tree5be98efdaef583aac94002838c200fa23adf2889 /winsup/cygwin/dtable.cc
parentc1d26a99cd72be7ab41411d7c49b7dc6c063734d (diff)
* fhandler.h (fhandler_base::nohandle): Revert to standard implementation.
* dtable.cc (dtable::fixup_after_exec): Specifically reject releasing nohandle() type fhandlers rather than relying on contents of io_handle. (dtable::fixup_after_fork): Ditto. * fhandler_termios.cc: Add includes necessary for definitions of have_execed and have_execed_cygwin. (fhandler_termios::sigflush): Don't flush console input when we've started a non-Cygwin process.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 498e7fd8d..27e741c02 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -863,7 +863,7 @@ dtable::fixup_after_exec ()
/* Close the handle if it's close-on-exec or if an error was detected
(typically with opening a console in a gui app) by fixup_after_exec.
*/
- if (fh->close_on_exec () || !fh->get_io_handle ())
+ if (fh->close_on_exec () || (!fh->nohandle () && !fh->get_io_handle ()))
fixup_close (i, fh);
else if (fh->get_popen_pid ())
close (i);
@@ -885,7 +885,7 @@ dtable::fixup_after_fork (HANDLE parent)
{
debug_printf ("fd %d (%s)", i, fh->get_name ());
fh->fixup_after_fork (parent);
- if (!fh->get_io_handle ())
+ if (!fh->nohandle () && !fh->get_io_handle ())
{
/* This should actually never happen but it's here to make sure
we don't crash due to access of an unopened file handle. */