1.0.25.41: only call pthread_kill with valid thread ids
[sbcl.git] / src / runtime / bsd-os.c
index e31048a..e9dacd5 100644 (file)
@@ -222,11 +222,20 @@ memory_fault_handler(int signal, siginfo_t *siginfo, void *void_context
 #ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
             lisp_memory_fault_error(context, fault_addr);
 #else
+
+            /* this disabled section is what used to be here: */
+#if 0
             /* FIXME: never returns 0 */
             if (!maybe_gc(context)) {
                 interrupt_handle_now(signal, siginfo, context);
             }
 #endif
+            /* FIXME: Nowadays, maybe_gc does return 1 to indicate
+             * that GC did happen, but I'm keeping the code as it
+             * was. */
+            maybe_gc(context);
+            interrupt_handle_now(signal, siginfo, context);
+#endif
         }
 }
 
@@ -257,10 +266,6 @@ os_install_interrupt_handlers(void)
                                                  interrupt_thread_handler);
     undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
                                                  sig_stop_for_gc_handler);
-#ifdef SIG_RESUME_FROM_GC
-    undoably_install_low_level_interrupt_handler(SIG_RESUME_FROM_GC,
-                                                 sig_stop_for_gc_handler);
-#endif
 #endif
     SHOW("leaving os_install_interrupt_handlers()");
 }