all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19742: 'wrap-program' should really preserve argv[0]
@ 2015-02-01 21:39 Ludovic Courtès
  2015-02-16 14:26 ` bug#19742: Close Andreas Enge
       [not found] ` <20150215163907.GA6404@debian>
  0 siblings, 2 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-02-01 21:39 UTC (permalink / raw)
  To: 19742

[-- 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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-23 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-01 21:39 bug#19742: 'wrap-program' should really preserve argv[0] Ludovic Courtès
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

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.