diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-08-01 22:09:24 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-08-01 22:09:24 -0700 |
commit | 3c616876604219141ad1088e372c91928508f089 (patch) | |
tree | 24d70ed56ae73ac1efdf483d03d5cedc1d3b76f4 | |
parent | 94dd3a05573c6fdd0662478ed5d57cef9d7e8b81 (diff) | |
download | txr-3c616876604219141ad1088e372c91928508f089.tar.gz txr-3c616876604219141ad1088e372c91928508f089.tar.bz2 txr-3c616876604219141ad1088e372c91928508f089.zip |
* signal.c (set_sig_handler): Don't use SA_ONSTACK
except for signals for which we use alt stack.
* signal.h (sig_save_enable): Do sig_check before
enabling async signals. This caused the !async_sig_enabled assertion
to trip inside make_obj.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | signal.c | 5 | ||||
-rw-r--r-- | signal.h | 2 |
3 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,14 @@ 2014-08-01 Kaz Kylheku <kaz@kylheku.com> + * signal.c (set_sig_handler): Don't use SA_ONSTACK + except for signals for which we use alt stack. + + * signal.h (sig_save_enable): Do sig_check before + enabling async signals. This caused the !async_sig_enabled assertion + to trip inside make_obj. + +2014-08-01 Kaz Kylheku <kaz@kylheku.com> + * signal.c (sig_hup, sig_int, sig_quit, sig_ill, sig_trap, sig_abrt, sig_bus, sig_fpe, sig_kill, sig_usr1, sig_segv, sig_usr2, sig_pipe, sig_alrm, sig_term, sig_chld, sig_cont, sig_stop, sig_tstp, sig_ttin, @@ -236,9 +236,10 @@ val set_sig_handler(val signo, val lambda) sa.sa_handler = sig_handler; sigfillset(&sa.sa_mask); #if HAVE_SIGALTSTACK - if (sig == SIGSEGV || sig == SIGBUS) + if (sig == SIGSEGV || sig == SIGBUS) { setup_alt_stack(); - sa.sa_flags |= SA_ONSTACK; + sa.sa_flags |= SA_ONSTACK; + } #endif sigaction(sig, &sa, 0); } @@ -30,9 +30,9 @@ #define sig_save_enable \ do { \ int sig_save = async_sig_enabled; \ - async_sig_enabled = 1; \ if (!sig_save) \ sig_check(); \ + async_sig_enabled = 1; \ { \ typedef void v_o_i_d |