+2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Do not use SA_NODEFER.
+ Problem reported by Dani Moncayo in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
+ * alloc.c (die):
+ * sysdep.c (emacs_abort): Do not reset signal handler.
+ * emacs.c (terminate_due_to_signal): Reset signal handler here.
+ * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
+ wanted even on POSIXish hosts, and it doesn't work on Windows.
+
2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
* xterm.c (x_term_init): Call fixup_locale before and after calling
void
die (const char *msg, const char *file, int line)
{
- signal (SIGABRT, SIG_DFL);
fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n",
file, line, msg);
terminate_due_to_signal (SIGABRT, INT_MAX);
_Noreturn void
terminate_due_to_signal (int sig, int backtrace_limit)
{
+ signal (sig, SIG_DFL);
totally_unblock_input ();
/* If fatal error occurs in code below, avoid infinite recursion. */
sigfillset (&process_fatal_action.sa_mask);
process_fatal_action.sa_handler = deliver_fatal_signal;
- process_fatal_action.sa_flags = emacs_sigaction_flags () | SA_NODEFER;
+ process_fatal_action.sa_flags = emacs_sigaction_flags ();
sigfillset (&thread_fatal_action.sa_mask);
thread_fatal_action.sa_handler = deliver_fatal_thread_signal;
void
emacs_abort (void)
{
- signal (SIGABRT, SIG_DFL);
terminate_due_to_signal (SIGABRT, 10);
}
#endif