diff options
author | Christopher Faylor <me@cgf.cx> | 2012-04-18 09:57:38 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-04-18 09:57:38 +0400 |
commit | 55dcba98dbd120db696fba3dda62a348599a2889 (patch) | |
tree | 5be98efdaef583aac94002838c200fa23adf2889 /winsup/cygwin/fhandler_termios.cc | |
parent | c1d26a99cd72be7ab41411d7c49b7dc6c063734d (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/fhandler_termios.cc')
-rw-r--r-- | winsup/cygwin/fhandler_termios.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 70fb12877..7fddba5b3 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -19,6 +19,9 @@ details. */ #include "pinfo.h" #include "tty.h" #include "cygtls.h" +#include "dtable.h" +#include "cygheap.h" +#include "child_info.h" #include "ntdll.h" /* Common functions shared by tty/console */ @@ -397,7 +400,8 @@ fhandler_termios::sigflush () /* FIXME: Checking get_ttyp() for NULL is not right since it should not be NULL while this is alive. However, we can conceivably close a ctty while exiting and that will zero this. */ - if (get_ttyp () && !(get_ttyp ()->ti.c_lflag & NOFLSH)) + if ((!have_execed || have_execed_cygwin) && get_ttyp () + && !(get_ttyp ()->ti.c_lflag & NOFLSH)) tcflush (TCIFLUSH); } |