summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2017-04-05 02:48:49 -0400
committerKen Raeburn <raeburn@raeburn.org>2017-04-06 02:10:53 -0400
commit8ca2bd1ce7eebaf3b995786d9f9f61907ebbb060 (patch)
treefb17a907553a16782845c6b3101ef2b4d3467ee3
parentdd09e72ed6b1c6ba5c584e7aa32d98437d96326a (diff)
downloademacs-8ca2bd1ce7eebaf3b995786d9f9f61907ebbb060.tar.gz
emacs-8ca2bd1ce7eebaf3b995786d9f9f61907ebbb060.tar.bz2
emacs-8ca2bd1ce7eebaf3b995786d9f9f61907ebbb060.zip
In CANNOT_DUMP builds, don't prepare for unexec.
Having a command-line argument of "dump" or "bootstrap" would trigger behavior like not installing signal handlers. In CANNOT_DUMP modes, we should get signal handlers installed regardless of whatever funny file names we decide to edit. src/emacs.c (main) [CANNOT_DUMP]: Don't enable the "dumping" alterations to initialization that prepares the process for unexec.
-rw-r--r--src/emacs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 2b01a37f5ab..9339d60866c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -683,8 +683,12 @@ main (int argc, char **argv)
/* Record (approximately) where the stack begins. */
stack_bottom = &stack_bottom_variable;
+#ifndef CANNOT_DUMP
dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0
|| strcmp (argv[argc - 1], "bootstrap") == 0);
+#else
+ dumping = false;
+#endif
/* True if address randomization interferes with memory allocation. */
# ifdef __PPC64__