diff options
author | Po Lu <luangruo@yahoo.com> | 2023-05-05 14:13:37 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-05-05 14:15:23 +0800 |
commit | b1bda8228e5788391cefbb4721af24f5713a0e37 (patch) | |
tree | 9d09f7fdd0122b8a49619990c4e0a8b5316d048d | |
parent | a2d4cd06f455e815c0c01434458b810367a66c92 (diff) | |
download | emacs-b1bda8228e5788391cefbb4721af24f5713a0e37.tar.gz |
More fixes for NetBSD/vax
* src/sysdep.c (init_signals) [__vax__]: Treat SIGILL
as a floating point error on VAXen.
Otherwise, (log 0.0) crashes Emacs.
-rw-r--r-- | src/sysdep.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index ce6a20f5302..7bac3d8935a 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2005,7 +2005,9 @@ init_signals (void) signal (SIGPIPE, SIG_IGN); sigaction (SIGQUIT, &process_fatal_action, 0); +#ifndef __vax__ sigaction (SIGILL, &thread_fatal_action, 0); +#endif /* __vax__ */ sigaction (SIGTRAP, &thread_fatal_action, 0); /* Typically SIGFPE is thread-specific and is fatal, like SIGILL. @@ -2018,6 +2020,11 @@ init_signals (void) { emacs_sigaction_init (&action, deliver_arith_signal); sigaction (SIGFPE, &action, 0); +#ifdef __vax__ + /* NetBSD/vax generates SIGILL upon some floating point errors, + such as taking the log of 0.0. */ + sigaction (SIGILL, &action, 0); +#endif /* __vax__ */ } #ifdef SIGUSR1 |