void block_blockable_signals ()
{
sigset_t block;
- sigemptyset(&block);
- sigaddset_blockable(&block);
+ sigcopyset(&block, &blockable_sigset);
thread_sigmask(SIG_BLOCK, &block, 0);
}
{
lispobj context_sap = 0;
- check_blockables_blocked_or_lose();
fake_foreign_function_call(context);
+ if (!internal_errors_enabled) {
+ describe_internal_error(context);
+ /* There's no good way to recover from an internal error
+ * before the Lisp error handling mechanism is set up. */
+ lose("internal error too early in init, can't recover");
+ }
+
/* Allocate the SAP object while the interrupts are still
* disabled. */
- if (internal_errors_enabled) {
- context_sap = alloc_sap(context);
- }
+ context_sap = alloc_sap(context);
thread_sigmask(SIG_SETMASK, os_context_sigmask_addr(context), 0);
- if (internal_errors_enabled) {
- SHOW("in interrupt_internal_error");
+ SHOW("in interrupt_internal_error");
#ifdef QSHOW
- /* Display some rudimentary debugging information about the
- * error, so that even if the Lisp error handler gets badly
- * confused, we have a chance to determine what's going on. */
- describe_internal_error(context);
+ /* Display some rudimentary debugging information about the
+ * error, so that even if the Lisp error handler gets badly
+ * confused, we have a chance to determine what's going on. */
+ describe_internal_error(context);
#endif
- funcall2(SymbolFunction(INTERNAL_ERROR), context_sap,
- continuable ? T : NIL);
- } else {
- describe_internal_error(context);
- /* There's no good way to recover from an internal error
- * before the Lisp error handling mechanism is set up. */
- lose("internal error too early in init, can't recover");
- }
+ funcall2(SymbolFunction(INTERNAL_ERROR), context_sap,
+ continuable ? T : NIL);
+
undo_fake_foreign_function_call(context); /* blocks signals again */
if (continuable) {
arch_skip_instruction(context);
/* need the context stored so it can have registers scavenged */
fake_foreign_function_call(context);
- sigemptyset(&ss);
- for(i=1;i<NSIG;i++) sigaddset(&ss,i); /* Block everything. */
+ sigfillset(&ss); /* Block everything. */
thread_sigmask(SIG_BLOCK,&ss,0);
/* The GC can't tell if a thread is a zombie, so this would be a
os_context_t *context=(os_context_t *) void_context;
struct thread *thread=arch_os_get_current_thread();
- check_blockables_blocked_or_lose();
fake_foreign_function_call(context);
/* SUB-GC may return without GCing if *GC-INHIBIT* is set, in
|| (signal==SIG_INTERRUPT_THREAD)
#endif
)
- sa.sa_flags|= SA_ONSTACK;
+ sa.sa_flags |= SA_ONSTACK;
#endif
sigaction(signal, &sa, NULL);