Fix handling of fatal signals and exceptions on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Tue, 25 Sep 2012 11:50:01 +0000 (13:50 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 25 Sep 2012 11:50:01 +0000 (13:50 +0200)
commit16b22fef423afedf034460a0f811abf50d0c5f3e
tree42d6127bd2c77a3e8cb34c90276d3c23ca3224d4
parent9c52dd5a2ef4457d3a4bc33720ca5eb766d939a5
Fix handling of fatal signals and exceptions on MS-Windows.

 src/w32proc.c (sys_signal): Handle all signals defined by the
 MS-Windows runtime, not just SIGCHLD.  Actually install the signal
 handlers for signals supported by Windows.  Don't override
 term_ntproc as the handler for SIGABRT.
 (sigaction): Rewrite to call sys_signal instead of duplicating its
 code.
 (sys_kill): Improve commentary.
 src/w32.c (term_ntproc): Accept (and ignore) one argument, for
 consistency with a signature of a signal handler.  All callers
 changed.
 (init_ntproc): Accept an argument DUMPING.  If dumping, don't
 install term_ntproc as a signal handler for SIGABRT, as that
 should be done by the dumped Emacs.
 src/w32.h (init_ntproc, term_ntproc): Adjust prototypes.
 src/w32select.c (term_w32select): Protect against repeated
 invocation by setting clipboard_owner to NULL after calling
 DestroyWindow.
 src/emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
 and term_ntproc to their modified signatures.
src/ChangeLog
src/emacs.c
src/w32.c
src/w32.h
src/w32proc.c
src/w32select.c