From e935fcf08a59db8d8231de60c2279a04c6c6d554 Mon Sep 17 00:00:00 2001 From: Egor Duda Date: Mon, 12 Mar 2001 21:27:42 +0000 Subject: * fhandler.h (fhandler_termios::fixup_after_exec): New function. * fhandler.cc (fhandler_termios::fixup_after_fork): New function. Fixup output handle. * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output handle is now fixed up in fhandler_termios::fixup_after_fork(). --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/fhandler.h | 2 ++ winsup/cygwin/fhandler_termios.cc | 7 +++++++ winsup/cygwin/fhandler_tty.cc | 3 +-- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 718becad7..02e310f88 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2001-03-12 Egor Duda + + * fhandler.h (fhandler_termios::fixup_after_exec): New function. + * fhandler.cc (fhandler_termios::fixup_after_fork): New function. + Fixup output handle. + * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output + handle is now fixed up in fhandler_termios::fixup_after_fork(). + 2001-03-12 Egor Duda * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 155e2a8d4..7e827571e 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -581,6 +581,8 @@ public: bg_check_types bg_check (int sig); 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 (HANDLE parent) { fixup_after_fork (parent); } }; enum ansi_intensity diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 046199903..7b8c71feb 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -308,3 +308,10 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept) return input_done; } + +void +fhandler_termios::fixup_after_fork (HANDLE parent) +{ + this->fhandler_base::fixup_after_fork (parent); + fork_fixup (parent, get_output_handle (), "output_handle"); +} diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 705910e18..28ff6b61c 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1097,7 +1097,7 @@ fhandler_tty_common::set_close_on_exec (int val) void fhandler_tty_common::fixup_after_fork (HANDLE parent) { - this->fhandler_base::fixup_after_fork (parent); + this->fhandler_termios::fixup_after_fork (parent); if (output_done_event) fork_fixup (parent, output_done_event, "output_done_event"); if (ioctl_request_event) @@ -1116,7 +1116,6 @@ fhandler_tty_common::fixup_after_fork (HANDLE parent) } if (input_available_event) fork_fixup (parent, input_available_event, "input_available_event"); - fork_fixup (parent, output_handle, "output_handle"); fork_fixup (parent, inuse, "inuse"); } -- cgit v1.2.3