summaryrefslogtreecommitdiff
path: root/runner/executor.c
diff options
context:
space:
mode:
Diffstat (limited to 'runner/executor.c')
-rw-r--r--runner/executor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runner/executor.c b/runner/executor.c
index 39dee8c0..7a7e29d9 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -507,7 +507,6 @@ static int monitor_output(pid_t child,
if (wd_timeout - wd_extra < 0)
wd_extra = wd_timeout / 2;
timeout_intervals = timeout / (wd_timeout - wd_extra);
- intervals_left = timeout_intervals;
timeout /= timeout_intervals;
if (settings->log_level >= LOG_LEVEL_VERBOSE) {
@@ -518,6 +517,8 @@ static int monitor_output(pid_t child,
}
}
+ intervals_left = timeout_intervals;
+
while (outfd >= 0 || errfd >= 0 || sigfd >= 0) {
struct timeval tv = { .tv_sec = timeout };