all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 19742@debbugs.gnu.org
Subject: bug#19742: 'wrap-program' should really preserve argv[0]
Date: Sun, 01 Feb 2015 22:39:53 +0100	[thread overview]
Message-ID: <877fw1e2fq.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 99 bytes --]

It should be enough, and more appropriate, to simply preserve argv[0] in
wrappers.

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 544 bytes --]

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 4407f9a..ebe70a3 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -870,8 +870,7 @@ the previous wrapper."
     (with-output-to-file prog-tmp
       (lambda ()
         (format #t
-                "#!~a~%~a~%exec -a \"~a\" \"~a\" \"$@\"~%"
-                (which "bash")
+                "#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
                 (string-join (map export-variable vars)
                              "\n")
                 (canonicalize-path prog)

             reply	other threads:[~2015-02-01 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-01 21:39 Ludovic Courtès [this message]
2015-02-16 14:26 ` bug#19742: Close Andreas Enge
     [not found] ` <20150215163907.GA6404@debian>
2015-02-23 19:42   ` bug#19742: 'wrap-program' should really preserve argv[0] Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fw1e2fq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=19742@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.