Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-08-03 19:38:59 +0400
committerChristopher Faylor <me@cgf.cx>2012-08-03 19:38:59 +0400
commit45cb627406e6bc0fb523c8f40ef7fdec9e61df5c (patch)
treeead194d3249ddac12fccce481b8110f011d487db
parent4485a26eff2c9d432f9a5cfadc92d64508d21b25 (diff)
* exceptions.cc (sigdelayed): Simplify declaration.
(_cygtls::call_signal_handler): Fix test for when to pop signal stack. Only do it exactly when what is on the stack is a no-op.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/exceptions.cc10
2 files changed, 11 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 110d74c7d..362d41c93 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2012-08-03 Christopher Faylor <me.cygwin2012@cgf.cx>
+ * exceptions.cc (sigdelayed): Simplify declaration.
+ (_cygtls::call_signal_handler): Fix test for when to pop signal stack.
+ Only do it exactly when what is on the stack is a no-op.
+
+2012-08-03 Christopher Faylor <me.cygwin2012@cgf.cx>
+
* spawn.cc (child_info_spawn::worker): Put back a minor variation of
Corinna's test for detecting a background process when starting a
non-cygwin process.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 7db2f00ff..afbbff4cb 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -37,9 +37,7 @@ details. */
char debugger_command[2 * NT_MAX_PATH + 20];
-extern "C" {
-extern void sigdelayed ();
-};
+extern "C" void sigdelayed ();
static BOOL WINAPI ctrl_c_handler (DWORD);
@@ -1086,7 +1084,7 @@ sigignore (int sig)
}
/* Update the signal mask for this process and return the old mask.
- Called from sigdelayed */
+ Called from call_signal_handler */
extern "C" sigset_t
set_process_mask_delta ()
{
@@ -1265,7 +1263,9 @@ _cygtls::call_signal_handler ()
break;
}
- if (incyg)
+ /* Pop the stack if the next "return address" is sigdelayed, since
+ this function is doing what sigdelayed would have done anyway. */
+ if (retaddr () == (__stack_t) sigdelayed)
pop ();
debug_only_printf ("dealing with signal %d", sig);