GNU bug report logs -
#73318
31.0.50; with-native-compilation=aot breaks exec -a emacs
Previous Next
Full log
Message #26 received at 73318 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Ship Mints <shipmints <at> gmail.com>
>> Date: Tue, 17 Sep 2024 15:22:18 -0400
>> Cc: sbaugh <at> janestreet.com, 73318 <at> debbugs.gnu.org, larsi <at> gnus.org,
>> acorallo <at> 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.
This bug report was last modified 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.