GNU bug report logs - #40039
'wrap-script' introduces spurious argument

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Thu, 12 Mar 2020 14:27:01 UTC

Severity: normal

Full log


Message #11 received at 40039 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Brendan Tildesley <brendan.tildesley <at> gmail.com>
Cc: 40039 <at> debbugs.gnu.org
Subject: Re: bug#40039: 'wrap-script' introduces spurious argument
Date: Sun, 22 Mar 2020 11:27:30 +0100
Brendan Tildesley <brendan.tildesley <at> gmail.com> writes:

> It appears the repeated (car cl) results in the executable path
> getting sent to it's self as the first argument. I'm not sure how
> things managed to work up until now? I tested the following change and
> it fixed the one case I was using, but am not sure it is correct. why
> was the cons (car cl) there in the first place?

See the documentation of execl:

 -- Scheme Procedure: execl filename arg ...
 -- C Function: scm_execl (filename, args)
     Executes the file named by FILENAME as a new process image.  The
     remaining arguments are supplied to the process; from a C program
     they are accessible as the ‘argv’ argument to ‘main’.
     Conventionally the first ARG is the same as FILENAME.  All
     arguments must be strings.

     If ARG is missing, FILENAME is executed with a null argument list,
     which may have system-dependent side-effects.

     This procedure is currently implemented using the ‘execv’ system
     call, but we call it ‘execl’ because of its Scheme calling
     interface.

-- 
Ricardo




This bug report was last modified 3 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.