diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-04-01 18:34:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-04-01 18:34:15 -0700 |
commit | 7e37d257c80cf7160502df232e3cbed538211b3e (patch) | |
tree | 4818f13604d865984fe3e4c79cccea0538145efe | |
parent | 00a1bcc7720c99c2e540af45af0a2d5238fae381 (diff) | |
download | txr-7e37d257c80cf7160502df232e3cbed538211b3e.tar.gz txr-7e37d257c80cf7160502df232e3cbed538211b3e.tar.bz2 txr-7e37d257c80cf7160502df232e3cbed538211b3e.zip |
signal: consider SIGSYS as synchronous signal.
* signal.c (is_cpu_exception): Function renamed to
is_synchronous, and also checks for SIGSYS.
SIGSYS isn't a CPU exception, but is exception-like
in that the program is immediately informed that it
did something wrong.
(sig_handler): Follow above rename.
-rw-r--r-- | signal.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -55,12 +55,12 @@ small_sigset_t sig_blocked_cache; static val sig_lambda[MAX_SIG]; volatile unsigned long sig_deferred; -static int is_cpu_exception(int sig) +static int is_synchronous(int sig) { switch (sig) { case SIGFPE: case SIGILL: case SIGSEGV: case SIGBUS: - case SIGTRAP: + case SIGTRAP: case SIGSYS: return 1; default: return 0; @@ -79,7 +79,7 @@ static void sig_handler(int sig) val lambda = sig_lambda[sig]; int gc = 0; int as = 0; - int exc = is_cpu_exception(sig); + int exc = is_synchronous(sig); int ic = interrupt_count++; int in_interrupt = ic > 0; val *stack_lim = 0; |