diff options
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r-- | winsup/cygwin/fhandler_termios.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index bdfce4642..80131a796 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -371,6 +371,9 @@ fhandler_termios::lseek (_off64_t, int) void fhandler_termios::sigflush () { - if (!(get_ttyp ()->ti.c_lflag & NOFLSH)) + /* 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)) tcflush (TCIFLUSH); } |