diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-07 01:18:37 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-07 01:18:37 +0000 |
commit | c1644acb233ed749b28b4139604ab134cf1cd34c (patch) | |
tree | 3fd9f31c5c3d2f81996fd6ce65b627959e8fe015 /winsup/cygwin/exceptions.cc | |
parent | 8dec7b03798a822337c86dbbea2f764d165cd61d (diff) | |
download | cygnal-c1644acb233ed749b28b4139604ab134cf1cd34c.tar.gz cygnal-c1644acb233ed749b28b4139604ab134cf1cd34c.tar.bz2 cygnal-c1644acb233ed749b28b4139604ab134cf1cd34c.zip |
* exceptions.cc (signal_exit): Reset all mutos owned by the main thread.
* fhandler.h: Define *_output_mutex macros for serializing tty output.
(fhandler_termios): Remove restart_output_event. Define dummy output mutex
methods.
(fhandler_pty_master): Remove unneeded fixup_after_fork method.
* fhandler_termios.cc (fhandler_termios::line_edit): Acquire output_mutex when
CTRL-S is hit. Release it on CTRL-Q.
* fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
inappropriate OutputStopped test here. Just use the output mutex.
(fhandler_pty_master::fhandler_pty_master): Remove obsolete reference to
restart_output_event.
(fhandler_tty_common::close): Ditto.
(fhandler_pty_master::set_close_on_exec): Ditto.
(fhandler_pty_master::fixup_after_fork): Delete.
* tty.cc (tty::common_init): Ditto.
* sync.cc (muto::reset): New method.
* sync.h: Declare above method.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 8b208b973..3395a1eea 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1007,6 +1007,12 @@ signal_exit (int rc) /* If the exception handler gets a trap, we could recurse awhile. If this is non-zero, skip the cleaning up and exit NOW. */ + muto *m; + /* FIXME: Make multi-thread aware */ + for (m = muto_start.next; m != NULL; m = m->next) + if (m->unstable () || m->owner () == mainthread.id) + m->reset (); + rc = EXIT_SIGNAL | (rc << 8); if (exit_already++) { |