about summary refs log tree commit diff
path: root/src/libnix/exec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnix/exec.cc')
-rw-r--r--src/libnix/exec.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnix/exec.cc b/src/libnix/exec.cc
index a51b605d8100..4934712f9e4e 100644
--- a/src/libnix/exec.cc
+++ b/src/libnix/exec.cc
@@ -16,14 +16,14 @@ static string pathNullDevice = "/dev/null";
 
 /* Run a program. */
 void runProgram(const string & program, 
-    const Strings & args, const Environment & env)
+    const Strings & args, const Environment & env,
+    const string & logFileName)
 {
     /* Create a log file. */
-    string logFileName = nixLogDir + "/run.log";
     string logCommand = 
 	verbosity >= lvlDebug 
-	? "tee -a "  + logFileName + " >&2"
-	: "cat >> " + logFileName;
+	? "tee "  + logFileName + " >&2"
+	: "cat > " + logFileName;
     /* !!! auto-pclose on exit */
     FILE * logFile = popen(logCommand.c_str(), "w"); /* !!! escaping */
     if (!logFile)