From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29122: eshell passes ARGV[0] as full path to executable Date: Fri, 03 Nov 2017 10:54:46 +0200 Message-ID: <83a803wxm1.fsf@gnu.org> References: <87fu9v932y.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1509699319 21387 195.159.176.226 (3 Nov 2017 08:55:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Nov 2017 08:55:19 +0000 (UTC) Cc: yegortimoshenko@gmail.com, 29122@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 03 09:55:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAXkk-0004LN-0A for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 09:55:02 +0100 Original-Received: from localhost ([::1]:35475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAXkr-0000i0-87 for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 04:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAXkl-0000ht-Uh for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 04:55:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAXkl-00026M-0G for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 04:55:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39990) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAXkk-00025g-TH for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 04:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eAXkk-0007OA-KG for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 04:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2017 08:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29122-submit@debbugs.gnu.org id=B29122.150969929928389 (code B ref 29122); Fri, 03 Nov 2017 08:55:02 +0000 Original-Received: (at 29122) by debbugs.gnu.org; 3 Nov 2017 08:54:59 +0000 Original-Received: from localhost ([127.0.0.1]:48671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAXkg-0007Np-O1 for submit@debbugs.gnu.org; Fri, 03 Nov 2017 04:54:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAXkf-0007Nb-6R for 29122@debbugs.gnu.org; Fri, 03 Nov 2017 04:54:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAXkW-0001qh-V9 for 29122@debbugs.gnu.org; Fri, 03 Nov 2017 04:54:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAXkW-0001qX-R3; Fri, 03 Nov 2017 04:54:48 -0400 Original-Received: from [176.228.60.248] (port=1632 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eAXkW-0007eQ-76; Fri, 03 Nov 2017 04:54:48 -0400 In-reply-to: <87fu9v932y.fsf@users.sourceforge.net> (message from Noam Postavsky on Fri, 03 Nov 2017 04:30:29 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139398 Archived-At: > From: Noam Postavsky > Date: Fri, 03 Nov 2017 04:30:29 -0400 > Cc: 29122@debbugs.gnu.org > > > $ ./a.out > > /home/chronos/a.out > > > > This prints full path to the executable instead of passing the actual > > ARGV[0]. > > Hmm, I don't think that's really a bug though. It isn't, IMO. AFAIK, whether the value of argv[0] is an absolute file name or not, and whet it is, depends on the shell and on the other circumstances. > At any rate, to change this would require adding some option to > make-process, as presently Emacs provides no way of calling a process > with argv[0] different from the called executable. I'm not sure we should make such changes. Programs that rely on whether argv[0] is absolute or not are unportable at best, and should be fixed, rather than blaming this on the shell.