diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5a383ea18..90441627b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2005-12-20 Christopher Faylor + + * fhandler.h (fhandler_termios::fixup_after_exec): Make non-inlined. + * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Don't call + fixup_after_fork if close_on_exec'ed. + 2005-12-19 Christopher Faylor * cygtls.h (_cygtls::interrupt_now): Subsume interruptible(). diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 034281fba..0456ceca1 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -777,7 +777,7 @@ class fhandler_termios: public fhandler_base virtual DWORD __acquire_output_mutex (const char *fn, int ln, DWORD ms) {return 1;} virtual void __release_output_mutex (const char *fn, int ln) {} void fixup_after_fork (HANDLE); - void fixup_after_exec () { fixup_after_fork (NULL); } + void fixup_after_exec (); void echo_erase (int force = 0); virtual _off64_t lseek (_off64_t, int); }; diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 101a595fd..d607ea6b4 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -357,6 +357,13 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) return ret; } +void +fhandler_termios::fixup_after_exec () +{ + if (!close_on_exec ()) + fixup_after_fork (NULL); +} + void fhandler_termios::fixup_after_fork (HANDLE parent) {