I agree in the main. This thread looks relevant to pdump concerns. I have no experience making my own pdumps as some seem to do. https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00558.html On Tue, Sep 17, 2024 at 6:31 PM Spencer Baugh wrote: > Eli Zaretskii writes: > > >> From: Ship Mints > >> Date: Tue, 17 Sep 2024 15:22:18 -0400 > >> Cc: sbaugh@janestreet.com, 73318@debbugs.gnu.org, larsi@gnus.org, > >> acorallo@gnu.org > >> I think the kind of "unreliability" in question is, for example, when a > process starts and unlinks itself. I doubt > >> Emacs will ever do this. Using the proc file system is "technically" > unreliable, unable to cover 100% of all > >> potential cases, but is practically reliable, especially in this case. > > > > I don't remember the details, sorry. You are welcome to look up the > > past discussions in the archives. I think they were triggered by look > > up of the pdumper file, but the results of that are also used by the > > code which decides where to look for the *.eln files. > > I looked up /proc/self/exe in the archives and the only mention is > https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00951.html > > Gnulib uses /proc/self/exe to provide support for relocatability (in > progreloc.c). If it's reliable enough for Gnulib, it should be reliable > enough for Emacs. > > With all due humility, I think I personally am enough of an expert on > Linux minutiae to say that /proc/self/exe will be substantially more > reliable than using argv[0]. > > I can provide a patch to make invocation-directory use /proc/self/exe, > why don't we just try installing it on master? If it's worse, we should > learn soon enough. >