From 9dbfe242e3bdbfc7728a36c8a2b9fbbea2c8ed68 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 8 Dec 2006 15:44:00 +0000 Subject: * 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. --- nix.conf.example | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'nix.conf.example') diff --git a/nix.conf.example b/nix.conf.example index 2b3b6b970fe2..be6a955a8d5f 100644 --- a/nix.conf.example +++ b/nix.conf.example @@ -78,6 +78,23 @@ #build-max-jobs = 1 +### Option `build-max-silent-time' +# +# This option defines the maximum number of seconds that builder can +# go without producing any data on standard output or standard error. +# This is useful (for instance in a automated build system) to catch +# builds that are stuck in an infinite loop, or to catch remote builds +# that are hanging due to network problems. It can be overriden using +# the `--max-silent-time' command line switch. +# +# The value 0 means that there is no timeout. This is also the +# default. +# +# Example: +# build-max-silent-time = 600 # = 10 minutes +#build-max-silent-time = 0 + + ### Option `build-users-group' # # This options specifies the Unix group containing the Nix build user -- cgit 1.4.1