guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

96/118: fix disappearing bash arguments


From: Ludovic Courtès
Subject: 96/118: fix disappearing bash arguments
Date: Tue, 19 May 2015 14:45:56 +0000

civodul pushed a commit to branch nix
in repository guix.

commit 8c766e48d5c4741b63a4f24dc91138f587c04a5a
Author: Joel Taylor <address@hidden>
Date:   Thu Aug 21 14:06:49 2014 -0700

    fix disappearing bash arguments
---
 nix/libstore/build.cc |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index b848b8c..5c605a7 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2163,8 +2163,13 @@ void DerivationGoal::initChild()
         /* Fill in the arguments. */
         string builderBasename = baseNameOf(drv.builder);
         args.push_back(builderBasename.c_str());
-        foreach (Strings::iterator, i, drv.args)
-            args.push_back(rewriteHashes(*i, rewritesToTmp).c_str());
+        foreach (Strings::iterator, i, drv.args) {
+            auto re = rewriteHashes(*i, rewritesToTmp);
+            auto cstr = new char[re.length()+1];
+            std::strcpy(cstr, re.c_str());
+
+            args.push_back(cstr);
+        }
         args.push_back(0);
 
         restoreSIGPIPE();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]