From 871d0724fa3251afb026608af733d6eea4dce8fd Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 28 Dec 2012 18:06:17 +0000 Subject: * DevNotes: Add entry cgf-000019. * dcrt0.cc (do_exit): Just set exit_state to ES_EVENTS_TERMINATE and nuke call to events_terminate which just set a superfluous flag. * sigproc.cc (signal_exit_code): New variable. (setup_signal_exit): Define new function. (_cygtls::signal_exit): Remove accommodations for closing the signal pipe handle. (exit_thread): Just sleep if we're exiting. (wait_sig): If signal_exit_code is set, just handle bookkeeping signals and exit ReadFile loop if there is nothing more to process. Call signal_exit at end if signal_exit_code is non-zero. * sigproc.h (setup_signal_exit): Declare new function. * exceptions.cc (sigpacket::process): Use setup_signal_exit to control exiting due to a signal. (exception::handle): Ditto. Query exit_state rather than defunct exit_already to determine if we are exiting. * globals.cc (ES_SIGNAL_EXIT): New enum. * sync.h (lock_process::release): New function for explicitly unlocking muto. (lock_process::~lock_process): Use release method. --- winsup/cygwin/globals.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'winsup/cygwin/globals.cc') diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index 387515851..e0fa3eed4 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -34,6 +34,7 @@ UINT system_wow64_directory_length; enum exit_states { ES_NOT_EXITING = 0, + ES_SIGNAL_EXIT, ES_EXIT_STARTING, ES_PROCESS_LOCKED, ES_EVENTS_TERMINATE, -- cgit v1.2.3