aboutsummaryrefslogtreecommitdiffstats
path: root/src/pdumper.c
diff options
context:
space:
mode:
authorAndrea Corallo2020-09-26 15:12:30 +0200
committerAndrea Corallo2020-09-26 15:46:31 +0200
commitdc0cf16c7a60f36aafcf9b56513a855cefa7e1ad (patch)
treeb56d844da0d424bde63c9897f8e46249577d2fe3 /src/pdumper.c
parent29a8d9303bd3098eed88f3eb7394b66ae28cc887 (diff)
downloademacs-dc0cf16c7a60f36aafcf9b56513a855cefa7e1ad.tar.gz
emacs-dc0cf16c7a60f36aafcf9b56513a855cefa7e1ad.zip
Always set 'Vexec_path' before 'Vinvocation_directory' (bug#43137)
Do this as depending on the OS if argv0 is not populated 'Vexec_path' is used to infer 'Vinvocation_directory'. * src/pdumper.c (pdumper_load): Invoke 'init_vars_for_load' instead of 'set_invocation_vars'. * src/lisp.h: Extern 'init_vars_for_load' instead of 'set_invocation_vars' . * src/emacs.c (set_invocation_vars): Make it static and remove double invocation guard. (init_vars_for_load): Wrap 'init_callproc_1' and 'set_invocation_vars' calls + add double invocation guard. (init_cmdargs): Move out 'set_invocation_vars' invocation. (main): Call 'init_vars_for_load' instead of 'init_callproc_1'.
Diffstat (limited to 'src/pdumper.c')
-rw-r--r--src/pdumper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index 0a7e0388f1d..03391c49505 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5587,7 +5587,8 @@ pdumper_load (const char *dump_filename, char *argv0, char const *original_pwd)
5587 5587
5588 /* Once we can allocate and before loading .eln files we must set 5588 /* Once we can allocate and before loading .eln files we must set
5589 Vinvocation_directory (.eln paths are relative to it). */ 5589 Vinvocation_directory (.eln paths are relative to it). */
5590 set_invocation_vars (argv0, original_pwd); 5590 init_vars_for_load (argv0, original_pwd);
5591
5591 dump_do_all_dump_reloc_for_phase (header, dump_base, LATE_RELOCS); 5592 dump_do_all_dump_reloc_for_phase (header, dump_base, LATE_RELOCS);
5592 dump_do_all_dump_reloc_for_phase (header, dump_base, VERY_LATE_RELOCS); 5593 dump_do_all_dump_reloc_for_phase (header, dump_base, VERY_LATE_RELOCS);
5593 initialized = true; 5594 initialized = true;