From 0fd830efdfcac1a60a19b6bf4ae50f08bcf9456f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 4 Jan 2013 02:21:03 +0000 Subject: [PATCH] * globals.cc (exit_states): Renumber so that ES_EXIT_STARTING is first, as intended. * sigproc.cc (wait_sig): Only stop accepting signals after exit_state > ES_EXIT_STARTING. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/globals.cc | 2 +- winsup/cygwin/sigproc.cc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3b28859ac..ac6124745 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2013-01-03 Christopher Faylor + + * globals.cc (exit_states): Renumber so that ES_EXIT_STARTING is first, + as intended. + * sigproc.cc (wait_sig): Only stop accepting signals after + exit_state > ES_EXIT_STARTING. + 2013-01-03 Christopher Faylor * sigproc.cc (exit_thread): Set thread signal mask so that no signals diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index e0fa3eed4..19a65b16a 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -34,8 +34,8 @@ UINT system_wow64_directory_length; enum exit_states { ES_NOT_EXITING = 0, - ES_SIGNAL_EXIT, ES_EXIT_STARTING, + ES_SIGNAL_EXIT, ES_PROCESS_LOCKED, ES_EVENTS_TERMINATE, ES_SIGNAL, diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 4e8094073..f0498ad84 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1335,7 +1335,7 @@ wait_sig (VOID *) } /* Don't process signals when we start exiting */ - if (exit_state && pack.si.si_signo > 0) + if (exit_state > ES_EXIT_STARTING && pack.si.si_signo > 0) continue; sigset_t dummy_mask; -- 2.43.5