From d83c8259e602055e11aa92ef6adc4b597301fbb2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 19 Sep 2021 07:57:41 -0500 Subject: [PATCH] tighten fallback busyloop implementation --- libifupdown/execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libifupdown/execute.c b/libifupdown/execute.c index 45870e7..538e6e6 100644 --- a/libifupdown/execute.c +++ b/libifupdown/execute.c @@ -40,7 +40,7 @@ lif_process_monitor_busyloop(pid_t child, int timeout_sec, int *status) { int ticks = 0; - while (ticks < timeout_sec * 10) + while (ticks < timeout_sec * 20) { /* Ugly hack: most executors finish very quickly, * so give them a chance to finish before sleeping. @@ -50,7 +50,7 @@ lif_process_monitor_busyloop(pid_t child, int timeout_sec, int *status) if (waitpid(child, status, WNOHANG) == child) return true; - usleep(99950); + usleep(49950); ticks++; }