* cygheap.cc (init_cygheap::close_ctty): Avoid closing console-cttys since they
don't use archetypes and this will just result in double frees. * dll_init.cc (dll_list::protect): Define. (dll_list::alloc): Guard list access. (dll_list::detach): Ditto. * dll_init.h (dll_list::protect): Declare new muto. (dll_list::guard): Define/declare function to guard list access. * fhandler_termios.cc (fhandler_termios::sigflush): Avoid SEGV in pathological condition of get_ttyp() == NULL.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user