diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-09-25 13:50:01 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-09-25 13:50:01 +0200 |
commit | 16b22fef423afedf034460a0f811abf50d0c5f3e (patch) | |
tree | 42d6127bd2c77a3e8cb34c90276d3c23ca3224d4 /src/w32select.c | |
parent | 9c52dd5a2ef4457d3a4bc33720ca5eb766d939a5 (diff) | |
download | emacs-16b22fef423afedf034460a0f811abf50d0c5f3e.tar.gz |
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.
Diffstat (limited to 'src/w32select.c')
-rw-r--r-- | src/w32select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/w32select.c b/src/w32select.c index 061f5a4a0a8..66f9f7ab041 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -474,7 +474,10 @@ term_w32select (void) { /* This is needed to trigger WM_RENDERALLFORMATS. */ if (clipboard_owner != NULL) - DestroyWindow (clipboard_owner); + { + DestroyWindow (clipboard_owner); + clipboard_owner = NULL; + } } static void |