about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-05-09T15·17+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-05-09T15·17+0200
commit69b8f9980f39c14a59365a188b300a34d625a2cd (patch)
treee818b6d1e2777f344e3ad48e088f9289ef5b221b /src
parente93acab85298cf3433d1938828e7772e8faa55dc (diff)
build-remote.pl: Enforce timeouts locally
Don't pass --timeout / --max-silent-time to the remote builder.
Instead, let the local Nix process terminate the build if it exceeds a
timeout.  The remote builder will be killed as a side-effect.  This
gives better error reporting (since the timeout message from the
remote side wasn't properly propagated) and handles non-Nix problems
like SSH hangs.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 3f595e34fef8..e1aa0681cf6f 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -695,9 +695,7 @@ HookInstance::HookInstance()
                 throw SysError("dupping builder's stdout/stderr");
 
             execl(buildHook.c_str(), buildHook.c_str(), settings.thisSystem.c_str(),
-                (format("%1%") % settings.maxSilentTime).str().c_str(),
                 (format("%1%") % settings.printBuildTrace).str().c_str(),
-                (format("%1%") % settings.buildTimeout).str().c_str(),
                 NULL);
 
             throw SysError(format("executing `%1%'") % buildHook);
@@ -1646,7 +1644,7 @@ HookReply DerivationGoal::tryBuildHook()
     set<int> fds;
     fds.insert(hook->fromHook.readSide);
     fds.insert(hook->builderOut.readSide);
-    worker.childStarted(shared_from_this(), hook->pid, fds, false, false);
+    worker.childStarted(shared_from_this(), hook->pid, fds, false, true);
 
     if (settings.printBuildTrace)
         printMsg(lvlError, format("@ build-started %1% %2% %3% %4%")