Subject: bug#73318: 31.0.50; with-native-compilation=aot breaks exec -a emacs

From: Stefan Kangas <[email-masked]>
Date: Tue, 8 Oct 2024 23:35:11 +0000

Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Yes, I'm persuaded now that if we use /proc/self/exe, we should also use
> argv[0].  As Po Lu said, /proc can be unmounted, so we must have some
> other mechanism besides just /proc/self/exe.
[...]
> If we use /proc/self/exe, I'm fine with it being a fallback if all other
> mechanisms fail.  That should make these cases still work fine, right?

Did we discard the idea to check for /proc/self/exe first (on systems
that support it, of course), and falling back to argv[0] if that fails?

Could we use getauxval(AT_EXECFN) when we have glibc?