summaryrefslogtreecommitdiff
path: root/src/pdumper.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-03-21 17:55:16 +0200
committerEli Zaretskii <eliz@gnu.org>2019-03-21 17:55:16 +0200
commit107215596c1a8edfb239a88850d822642bc0e4af (patch)
treec0abe35a3b3cfee61fe793feb7684a0cdf3bce00 /src/pdumper.c
parentc569cceb2d334564d320d2b4098c855db7eb88a0 (diff)
downloademacs-107215596c1a8edfb239a88850d822642bc0e4af.tar.gz
Avoid duplicate entries in process-environment after re-dumping
* src/pdumper.c (Fdump_emacs_portable): Reset process-environment to nil. (Bug#34936)
Diffstat (limited to 'src/pdumper.c')
-rw-r--r--src/pdumper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index fbf17d1629e..f459d971c35 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4025,6 +4025,12 @@ types. */)
Lisp_Object symbol = intern ("command-line-processed");
specbind (symbol, Qnil);
+ /* Reset process-environment -- this is for when they re-dump a
+ pdump-restored emacs, since set_initial_environment wants always
+ to cons it from scratch. */
+ Vprocess_environment = Qnil;
+ garbage_collect ();
+
CHECK_STRING (filename);
filename = Fexpand_file_name (filename, Qnil);
filename = ENCODE_FILE (filename);