diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-23 22:50:20 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-23 22:50:20 +0000 |
commit | dcd0465b2b7d8693d6ba6a4225487b84ef5930a7 (patch) | |
tree | 1b70ddafbdc6d5f8388fbcc0a66089aa0a315cec /winsup/cygwin/exceptions.cc | |
parent | ede284de5fccecbde8a2b0b70471eec4cc5cd3eb (diff) | |
download | cygnal-dcd0465b2b7d8693d6ba6a4225487b84ef5930a7.tar.gz cygnal-dcd0465b2b7d8693d6ba6a4225487b84ef5930a7.tar.bz2 cygnal-dcd0465b2b7d8693d6ba6a4225487b84ef5930a7.zip |
* cygtls.cc (_cygtls::handle_threadlist_exception): Make an error fatal.
* cygtls.h (sockaddr_in): Use header rather than defining our own structure.
* exceptions.cc (_cygtls::interrupt_setup): Use exact contents of sa_mask
rather than assuming tht current sig should be masked, too.
(_cygtls::call_signal_handler): Use more aggressive locking.
* gendef (_sigbe): Wait until later before releasing incyg.
(_sigreturn): Remove more arguments to accommodate quasi-sa_sigaction support.
(_sigdelayed): Push arguments for sa_sigaction. More work needed here.
* signal.cc (sigaction): Implement SA_NODEFER.
* tlsoffsets.h: Regenerate.
* sigproc.cc (wait_sig): Use default buffer size of Windows 9x complains.
* pinfo.cc (_onreturn::dummy_handle): Remove.
(_onreturn::h): Make this a pointer.
(_onreturn::~_onreturn): Detect whether pointer is NULL rather than value is
NULL.
(_onreturn::_onreturn): Set h to NULL initially.
(_onreturn::no_close_p_handle): Set h to NULL.
(winpids::add): Initialize onreturn with value from p.hProcess immediately.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 152210ff3..0b3ee022e 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -50,7 +50,7 @@ static size_t windows_system_directory_length; /* This is set to indicate that we have already exited. */ static NO_COPY int exit_already = 0; -static NO_COPY muto mask_sync; +static muto NO_COPY mask_sync; NO_COPY static struct { @@ -706,7 +706,7 @@ void __stdcall _cygtls::interrupt_setup (int sig, void *handler, struct sigaction& siga) { push ((__stack_t) sigdelayed); - deltamask = (siga.sa_mask | SIGTOMASK (sig)) & ~SIG_NONMASKABLE; + deltamask = siga.sa_mask & ~SIG_NONMASKABLE; sa_flags = siga.sa_flags; func = (void (*) (int)) handler; saved_errno = -1; // Flag: no errno to save @@ -982,8 +982,7 @@ sigrelse (int sig) return 0; } -/* Update the signal mask for this process - and return the old mask. +/* Update the signal mask for this process and return the old mask. Called from sigdelayed */ extern "C" sigset_t set_process_mask_delta () @@ -1253,7 +1252,7 @@ _cygtls::call_signal_handler () /* Call signal handler. */ while (sig) { - lock (); unlock (); // make sure synchronized + lock (); this_sa_flags = sa_flags; int thissig = sig; @@ -1261,8 +1260,9 @@ _cygtls::call_signal_handler () reset_signal_arrived (); sigset_t this_oldmask = set_process_mask_delta (); int this_errno = saved_errno; - incyg--; sig = 0; + unlock (); // make sure synchronized + incyg = 0; if (!(this_sa_flags & SA_SIGINFO)) { void (*sigfunc) (int) = func; @@ -1275,7 +1275,7 @@ _cygtls::call_signal_handler () /* no ucontext_t information provided yet */ sigact (thissig, &thissi, NULL); } - incyg++; + incyg = 1; set_signal_mask (this_oldmask, myself->getsigmask ()); if (this_errno >= 0) set_errno (this_errno); |