From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73318: 31.0.50; with-native-compilation=aot breaks exec -a emacs Date: Tue, 17 Sep 2024 18:31:05 -0400 Message-ID: References: <864j6eb29f.fsf@gnu.org> <861q1iayk6.fsf@gnu.org> <86wmja9iwi.fsf@gnu.org> Reply-To: Spencer Baugh Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38003"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73318@debbugs.gnu.org, larsi@gnus.org, acorallo@gnu.org, Ship Mints To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 18 00:32:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqgjq-0009jt-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Sep 2024 00:32:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqgjd-0000qT-FC; Tue, 17 Sep 2024 18:31:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqgjb-0000q8-Do for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:31:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqgjb-0001dL-3s for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:31:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Xa+1FVWTpelqx11SP8gCCK8Qfa7ATfpFDSxvyF7brsk=; b=hfbJvSTIdm476Cjdt0NQWoOYP3ZgICM4DXdpFWU/LbLUtVmVleeOTC/VPpCaFkWkJiNuNyUV9EonIydmCBtGoZkE0UGgpPLHw2wuee/JjsECWUWAITvnmYXMAB7PckVopViKucH0C9yzOae8aXoPzp7Y56cGSCB+fwo3cHRlyEbeiJg36zvJ+Xbc7pLF/+bZKpHRJDFEuyfEYPBJBpyXAg8BCdydGOEUmDYDbIuyz2W98XR+2N/u4DSCc8GSeMkWyfXGNF9yQEJXefl/VLVGYh6YhXi1bDGix6RR/rwF1ZzPvcJ25DWtteWZDiejyyM8AhvWBfST/fcIgxxiQIxGNQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqgjq-0001pk-98 for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2024 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73318 X-GNU-PR-Package: emacs Original-Received: via spool by 73318-submit@debbugs.gnu.org id=B73318.17266122896974 (code B ref 73318); Tue, 17 Sep 2024 22:32:02 +0000 Original-Received: (at 73318) by debbugs.gnu.org; 17 Sep 2024 22:31:29 +0000 Original-Received: from localhost ([127.0.0.1]:56185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqgjI-0001oQ-Vy for submit@debbugs.gnu.org; Tue, 17 Sep 2024 18:31:29 -0400 Original-Received: from mxout2.mail.janestreet.com ([38.105.200.79]:47175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqgjG-0001o5-D4 for 73318@debbugs.gnu.org; Tue, 17 Sep 2024 18:31:27 -0400 In-Reply-To: <86wmja9iwi.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Sep 2024 22:31:25 +0300") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1726612265; bh=Xa+1FVWTpelqx11SP8gCCK8Qfa7ATfpFDSxvyF7brsk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=vl5qocb1yQRKL31/NdE9wrrCjOanqhX8JH/8RzhPvq4OYSa+T/rWsW/cnisWYqM1E RbceId73U0W67QMgySjAanxmrgm/ilzPFl30cx51IBAqFzIfL+tm1yeL6eIA+sUxKy whVd6jHrX0yshKdzLixrMLucxVEKpoh4OWjaJxfQ9ktks/plDbieiFQb2eWLsIhqeQ YQKTvnZEwktX08AqzovVhaR/nzACyOz4vxXBcJE6pJIrtbDJjZiKcRn7XiwGkQTSrY Tf6+Vfa0mGHMxgYjqGQ0VB0FUjDRk6trMMsPKqCElyLxjaotfW+7Gyg8MBrcnt3MbI a7d90DZG0RWYg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291979 Archived-At: 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.