From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: emacs-devel@gnu.org, rms@gnu.org, ali_gnu2@emvision.com
Subject: Re: Finding the dump (redux)
Date: Mon, 19 Apr 2021 16:00:44 +0300 [thread overview]
Message-ID: <83zgxusa2r.fsf@gnu.org> (raw)
In-Reply-To: <87zgxu7juf.fsf@igel.home> (message from Andreas Schwab on Mon, 19 Apr 2021 10:35:20 +0200)
> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: eliz@gnu.org, ali_gnu2@emvision.com, emacs-devel@gnu.org
> Date: Mon, 19 Apr 2021 10:35:20 +0200
>
> Name the pdumper file emacs-FINGERPRINT.pdmp (where FINGERPRINT is the
> hex string of the unique fingerprint). Then the file can be put in a
> fixed, shared directory without conflicts, and there is no need to use
> an elaborate search strategy. ^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The underlined part is not entirely accurate. We will still need to
look for the Emacs executable along PATH, resolve symlinks in the
result, then look in 2 possible places relative to that.
To elaborate, we currently do the following:
. if argv[0] doesn't have leading directories, look for it along PATH
. resolve symlink in the result to find the real place of the executable
. look in the same directory for BASENAME.pdmp, where BASENAME is the
basename of the resolved executable
. if there's no BASENAME.pdmp there, look for emacs.pdmp in the
directory specified by EXEC_PATH
. if that fails as well, look for BASE.pdm in EXEC_PATH, where BASE
is the basename of the original argv[0]
In each place where we look, if the file by that name exists, we try
to load it; if the load fails, we quit (and don't search in the rest
of the places). IOW, we only continue to the next candidate place if
the file by the name we looked for doesn't exist there.
Thus, using emacs-FINGERPRINT.pdmp can simplify this process:
. it will eliminate the need for the last step above
. it will avoid the danger that a file by the name we look does
exist in some place, but fails the fingerprint test, and thus
prevents us from finding the correct file in one of the other
places
But we'd still need to decide on a search strategy. For example, note
that the current strategy is the reverse of the one we use for looking
for Lisp files: there we first look in the installation directory and
only if that fails look in the source tree.
next prev parent reply other threads:[~2021-04-19 13:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 19:38 Finding the dump (redux) Ali Bahrami
2021-04-17 18:45 ` Eli Zaretskii
2021-04-18 0:15 ` Ali Bahrami
2021-04-18 7:55 ` Eli Zaretskii
2021-04-18 8:18 ` Andreas Schwab
2021-04-18 16:05 ` Glenn Morris
2021-04-19 4:53 ` Richard Stallman
2021-04-19 8:35 ` Andreas Schwab
2021-04-19 13:00 ` Eli Zaretskii [this message]
2021-04-19 13:04 ` Ali Bahrami
2021-04-19 13:14 ` Eli Zaretskii
2021-04-19 13:34 ` Stefan Kangas
2021-04-19 14:39 ` Eli Zaretskii
2021-04-19 15:41 ` Ali Bahrami
2021-04-19 15:58 ` Eli Zaretskii
2021-04-19 16:08 ` Ali Bahrami
2021-04-19 17:09 ` Eli Zaretskii
2021-04-19 4:01 ` Ali Bahrami
2021-04-19 13:26 ` Stefan Monnier
2021-04-19 14:28 ` Eli Zaretskii
2021-04-19 14:50 ` Stefan Monnier
2021-04-19 15:43 ` Ali Bahrami
2021-04-19 16:06 ` Eli Zaretskii
2021-04-19 16:39 ` Ali Bahrami
2021-04-19 17:19 ` Eli Zaretskii
2021-04-19 18:03 ` Ali Bahrami
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zgxusa2r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=ali_gnu2@emvision.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).