diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c index 6151d815b29..5fbf43e424e 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <signal.h> | ||
| 23 | #include <stdio.h> | 22 | #include <stdio.h> |
| 24 | #include <setjmp.h> | 23 | #include <setjmp.h> |
| 25 | 24 | ||
| @@ -3210,7 +3209,7 @@ syms_of_data (void) | |||
| 3210 | static _Noreturn void | 3209 | static _Noreturn void |
| 3211 | handle_arith_signal (int sig) | 3210 | handle_arith_signal (int sig) |
| 3212 | { | 3211 | { |
| 3213 | sigsetmask (SIGEMPTYMASK); | 3212 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); |
| 3214 | xsignal0 (Qarith_error); | 3213 | xsignal0 (Qarith_error); |
| 3215 | } | 3214 | } |
| 3216 | 3215 | ||
| @@ -3223,6 +3222,7 @@ deliver_arith_signal (int sig) | |||
| 3223 | void | 3222 | void |
| 3224 | init_data (void) | 3223 | init_data (void) |
| 3225 | { | 3224 | { |
| 3225 | struct sigaction action; | ||
| 3226 | /* Don't do this if just dumping out. | 3226 | /* Don't do this if just dumping out. |
| 3227 | We don't want to call `signal' in this case | 3227 | We don't want to call `signal' in this case |
| 3228 | so that we don't have trouble with dumping | 3228 | so that we don't have trouble with dumping |
| @@ -3231,5 +3231,6 @@ init_data (void) | |||
| 3231 | if (!initialized) | 3231 | if (!initialized) |
| 3232 | return; | 3232 | return; |
| 3233 | #endif /* CANNOT_DUMP */ | 3233 | #endif /* CANNOT_DUMP */ |
| 3234 | signal (SIGFPE, deliver_arith_signal); | 3234 | emacs_sigaction_init (&action, deliver_arith_signal); |
| 3235 | sigaction (SIGFPE, &action, 0); | ||
| 3235 | } | 3236 | } |