From 7de331b5619a2e011398e69b892854bbbec4a5ca Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Sat, 22 Nov 1997 14:38:21 +0000
Subject: [PATCH] Have interrupt_handle_pending reset the signal context
 sigmask before calling interrupt_handle_now, else when interrupt_handle_now
 resets signal mask to that in the signal context it will be masking the
 interrupts where the intention is to re-enable them. This caused the
 multi-processing to get stuck working on a particular process with the
 signals masked.  Change may have another benefit: the pending_mask is no
 longer needed so there is no danger from recursive pending interrupts.

---
 lisp/interrupt.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/lisp/interrupt.c b/lisp/interrupt.c
index 0d98948a4..2e9c8f425 100644
--- a/lisp/interrupt.c
+++ b/lisp/interrupt.c
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.11 1997/11/21 12:20:34 dtc Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.12 1997/11/22 14:38:21 dtc Exp $ */
 
 /* Interrupt handing magic. */
 
@@ -205,6 +205,15 @@ interrupt_handle_pending(struct sigcontext *context)
 	if (were_in_lisp)
 	    undo_fake_foreign_function_call(context);
     }
+
+#ifdef POSIX_SIGS
+    context->uc_sigmask = pending_mask;
+    sigemptyset(&pending_mask);
+#else
+    context->sc_mask = pending_mask;
+    pending_mask = 0;
+#endif
+
     if (pending_signal) {
 	int signal;
 #ifdef SOLARIS
@@ -222,13 +231,6 @@ interrupt_handle_pending(struct sigcontext *context)
 	interrupt_handle_now(signal, PASSCODE(code), context);
 #endif
     }
-#ifdef POSIX_SIGS
-    context->uc_sigmask = pending_mask;
-    sigemptyset(&pending_mask);
-#else
-    context->sc_mask = pending_mask;
-    pending_mask = 0;
-#endif
 }
 
 
-- 
GitLab