diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-10-06T15·33+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-10-06T15·33+0200 |
commit | 1abda8e17311fbfc27b751b90aff4f691f496b0f (patch) | |
tree | f5ea0a3faa048610cffddcebfa0ee9f022a21440 /src/libstore | |
parent | 9ffc4f4363d9596e2477645eab94e4140cd47c19 (diff) |
nix-store --serve: Implement log size limit
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 3 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 70278a8785d6..3adad662d072 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2854,7 +2854,8 @@ void DerivationGoal::handleChildOutput(int fd, const string & data) printMsg(lvlError, format("%1% killed after writing more than %2% bytes of log output") % getName() % settings.maxLogSize); - timedOut(); // not really a timeout, but close enough + killChild(); + done(BuildResult::LogLimitExceeded); return; } if (verbosity >= settings.buildVerbosity) diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 235017503213..485209d7a8b7 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -112,7 +112,8 @@ struct BuildResult CachedFailure, TimedOut, MiscFailure, - DependencyFailed + DependencyFailed, + LogLimitExceeded, } status = MiscFailure; std::string errorMsg; //time_t startTime = 0, stopTime = 0; |