1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

* Kill a build if it has gone for more than a certain number of

seconds without producing output on stdout or stderr (NIX-65).  This
  timeout can be specified using the `--max-silent-time' option or the
  `build-max-silent-time' configuration setting.  The default is
  infinity (0).

* Fix a tricky race condition: if we kill the build user before the
  child has done its setuid() to the build user uid, then it won't be
  killed, and we'll potentially lock up in pid.wait().  So also send a
  conventional kill to the child.
This commit is contained in:
Eelco Dolstra 2006-12-08 15:44:00 +00:00
parent d3fe6ab024
commit 9dbfe242e3
7 changed files with 107 additions and 20 deletions

View file

@ -24,6 +24,7 @@ Verbosity buildVerbosity = lvlInfo;
unsigned int maxBuildJobs = 1;
bool readOnlyMode = false;
string thisSystem = "unset";
unsigned int maxSilentTime = 0;
static bool settingsRead = false;
@ -104,5 +105,14 @@ bool queryBoolSetting(const string & name, bool def)
% name % v);
}
unsigned int queryIntSetting(const string & name, unsigned int def)
{
int n;
if (!string2Int(querySetting(name, int2String(def)), n) || n < 0)
throw Error(format("configuration setting `%1%' should have an integer value") % name);
return n;
}
}