summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/emacs.c b/src/emacs.c
index b1b2170a028..aaf058e4a80 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -370,17 +370,20 @@ terminate_due_to_signal (int sig, int backtrace_limit)
{
signal (sig, SIG_DFL);
- /* If fatal error occurs in code below, avoid infinite recursion. */
- if (! fatal_error_in_progress)
+ if (attempt_orderly_shutdown_on_fatal_signal)
{
- fatal_error_in_progress = 1;
+ /* If fatal error occurs in code below, avoid infinite recursion. */
+ if (! fatal_error_in_progress)
+ {
+ fatal_error_in_progress = 1;
- totally_unblock_input ();
- if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
- Fkill_emacs (make_number (sig));
+ totally_unblock_input ();
+ if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
+ Fkill_emacs (make_number (sig));
- shut_down_emacs (sig, Qnil);
- emacs_backtrace (backtrace_limit);
+ shut_down_emacs (sig, Qnil);
+ emacs_backtrace (backtrace_limit);
+ }
}
/* Signal the same code; this time it will really be fatal.
@@ -1357,6 +1360,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
tzset ();
#endif /* MSDOS */
+#ifdef HAVE_KQUEUE
+ globals_of_kqueue ();
+#endif
+
#ifdef HAVE_GFILENOTIFY
globals_of_gfilenotify ();
#endif
@@ -1532,14 +1539,18 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
syms_of_gnutls ();
-#ifdef HAVE_GFILENOTIFY
- syms_of_gfilenotify ();
-#endif /* HAVE_GFILENOTIFY */
-
#ifdef HAVE_INOTIFY
syms_of_inotify ();
#endif /* HAVE_INOTIFY */
+#ifdef HAVE_KQUEUE
+ syms_of_kqueue ();
+#endif /* HAVE_KQUEUE */
+
+#ifdef HAVE_GFILENOTIFY
+ syms_of_gfilenotify ();
+#endif /* HAVE_GFILENOTIFY */
+
#ifdef HAVE_DBUS
syms_of_dbusbind ();
#endif /* HAVE_DBUS */