Blob Blame History Raw
From 028082a6a1ff650d5cdf796ac55ac26a3874372a Mon Sep 17 00:00:00 2001
From: Liu Chao <liuchao173@huawei.com>
Date: Sat, 25 Jun 2022 14:13:10 +0800
Subject: [PATCH 07/14] add keep_going check to prevent irqbalance from failing
 to exit after SIGTERM

Signed-off-by: Liu Chao <liuchao173@huawei.com>
---
 irqbalance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/irqbalance.c b/irqbalance.c
index c520c11..5eae5b6 100644
--- a/irqbalance.c
+++ b/irqbalance.c
@@ -290,7 +290,7 @@ gboolean scan(gpointer data __attribute__((unused)))
 
 
 	/* cope with cpu hotplug -- detected during /proc/interrupts parsing */
-	while (need_rescan || need_rebuild) {
+	while (keep_going && (need_rescan || need_rebuild)) {
 		int try_times = 0;
 
 		need_rescan = 0;
-- 
2.33.1