Handle sigmask better with nested signal handlers.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Mar 2014 14:43:26 +0000 (07:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Mar 2014 14:43:26 +0000 (07:43 -0700)
commit1e952f0a7a1d0cc533438dcad37db08d8af6855f
tree423d42b20476efd08fa7c0e4b62756c1b09c8cdd
parent1edb4a2ec657c305880901e78317daf1990b5358
Handle sigmask better with nested signal handlers.

* atimer.c (sigmask_atimers): Remove.
Remaining use rewritten to use body of this function.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
New arg OLDSET.  All callers changed.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* keyboard.c (handle_interrupt):
* sound.c (vox_configure, vox_close):
Restore the old signal mask rather than unilaterally clearing bits
from the mask, in case a handler is running within another
handler.  All callers changed.
* lisp.h, process.c, process.h, term.c:
Adjust decls and callers to match new API.
* sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
signal handlers aren't supposed to use floating point anyway.
(handle_arith_signal): Unblock just SIGFPE rather than clearing mask.

Fixes: debbugs:15561
src/ChangeLog
src/atimer.c
src/callproc.c
src/keyboard.c
src/lisp.h
src/process.c
src/process.h
src/sound.c
src/sysdep.c
src/term.c