From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [UX] real names exposed Date: Sun, 04 Sep 2016 00:33:13 +0200 Message-ID: <87bn04k40m.fsf@gnu.org> References: <147266794967.23966.13712862947716543821@what> <20160831231110.GB18814@jasmine> <87wpiwt2qx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgJV6-0003LQ-6E for help-guix@gnu.org; Sat, 03 Sep 2016 18:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgJV0-0003Ei-7N for help-guix@gnu.org; Sat, 03 Sep 2016 18:33:23 -0400 In-Reply-To: <87wpiwt2qx.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 01 Sep 2016 10:59:02 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Eric Bavier Cc: help-guix@gnu.org, Help-Guix Hello, ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > $ sh -c 'exec -a FOO /gnu/store/6vmniz83k46l8jpry50wdvwxsncz1r5w-khal-0.7= .0/bin/.khal-wrap-01 --version' > .khal-real, version 0.7.0 What happens is that =E2=80=98exec -a=E2=80=99 is doesn=E2=80=99t work when= the wrapped program is a script. This is because, when invoked via a shebang (or when passed the file name of a script), interpreters receive the file name of the script as argv[1], and then typically shift argv to the left (argv[1] becomes argv[0] etc.) AFAICS there=E2=80=99s no generic solution to this problem. :-/ Ludo=E2=80=99.