summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2019-12-03 12:44:56 +0200
committerPetri Latvala <petri.latvala@intel.com>2019-12-05 12:18:52 +0200
commite26259c7570390aa0664b250cb842439598bcbff (patch)
tree1f861bf4d69df0443ac03bf62d27e859adda43f1 /runner
parente48351d3dbae9e724c6f40f2cdc910fce3c94b3b (diff)
runner: Actually ping watchdogs every interval
The split to timeout intervals was made to accomodate for watchdogs that cannot use a timeout as high as we wanted. Actually using that feature requires us to ping the watchdog every interval even though we handle actual timeouting after all intervals are used up. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'runner')
-rw-r--r--runner/executor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/runner/executor.c b/runner/executor.c
index ba58fb17..e6086772 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -734,6 +734,8 @@ static int monitor_output(pid_t child,
FD_SET(sigfd, &set);
n = select(nfds, &set, NULL, NULL, timeout == 0 ? NULL : &tv);
+ ping_watchdogs();
+
if (n < 0) {
/* TODO */
return -1;
@@ -743,8 +745,6 @@ static int monitor_output(pid_t child,
if (--intervals_left)
continue;
- ping_watchdogs();
-
switch (killed) {
case 0:
show_kernel_task_state();
@@ -807,7 +807,6 @@ static int monitor_output(pid_t child,
}
intervals_left = timeout_intervals;
- ping_watchdogs();
/* TODO: Refactor these handlers to their own functions */
if (outfd >= 0 && FD_ISSET(outfd, &set)) {