Skip to content

Commit

Permalink
Set exec-path from PATH when loading pdumps
Browse files Browse the repository at this point in the history
  • Loading branch information
antifuchs committed Sep 2, 2020
1 parent 158a832 commit 2c91d2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/callproc.c
Expand Up @@ -1520,6 +1520,12 @@ egetenv_internal (const char *var, ptrdiff_t len)
void
init_callproc_1 (void)
{
/* This function can be called from within pdumper or later during
boot. No need to run it twice. */
static bool double_run_guard;
if (double_run_guard)
return;
double_run_guard = true;
#ifdef HAVE_NS
const char *etc_dir = ns_etc_directory ();
const char *path_exec = ns_exec_path ();
Expand Down
1 change: 1 addition & 0 deletions src/pdumper.c
Expand Up @@ -5590,6 +5590,7 @@ pdumper_load (const char *dump_filename, char *argv0, char const *original_pwd)

/* Once we can allocate and before loading .eln files we must set
Vinvocation_directory (.eln paths are relative to it). */
init_callproc_1 ();
set_invocation_vars (argv0, original_pwd);
dump_do_all_dump_reloc_for_phase (header, dump_base, LATE_RELOCS);
dump_do_all_dump_reloc_for_phase (header, dump_base, VERY_LATE_RELOCS);
Expand Down

0 comments on commit 2c91d2c

Please sign in to comment.