From 4762dd27f8a5b91afaf2ac72edde49ffc0ecc7f1 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sat, 28 Jul 2018 12:24:20 +0000 Subject: Allow disabling build_stalled_timeout --- NEWS | 1 + lib/Iurt/Process.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 44697f7..8bb1d84 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ - increase default timeout for commands to 10 minutes - consider build fail after faildelay even if machine is unreachable +- allow disabling build_stalled_timeout 0.7.5 - iurt: fix checking if chroot needs updating diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 131a5a6..dc25f99 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -106,7 +106,7 @@ sub fork_to_monitor { kill 14, "-$parent_pid"; exit(); } - if ($stat[9] && $stat[9] + $opt{stalled_timeout} < time()) { + if ($opt{stalled_timeout} && $stat[9] && $stat[9] + $opt{stalled_timeout} < time()) { # If nothing was written to the logfile for more than stalled_timeout, check if the system seems busy if ((getload())[1] < 0.5) { plog('ERROR', "Killing current command because it seems blocked"); -- cgit v1.2.1