[PATCH v3 1/3] eloop: dump a trace when exiting due to SIGALRM

Benjamin Berg benjamin at sipsolutions.net
Wed Jul 30 05:44:41 PDT 2025


From: Benjamin Berg <benjamin.berg at intel.com>

We configure a SIGALRM when receiving a signal to exit. If this SIGALRM
is fired, then the process did not properly exit. When this happens,
dump a trace to help with debugging.

Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
---
 src/utils/eloop.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/utils/eloop.c b/src/utils/eloop.c
index 00b0beff0b..67bd76bb33 100644
--- a/src/utils/eloop.c
+++ b/src/utils/eloop.c
@@ -971,6 +971,9 @@ static void eloop_handle_alarm(int sig)
 		   "is a bug that ends up in a busy loop that "
 		   "prevents clean shutdown.\n"
 		   "Killing program forcefully.\n");
+#ifdef WPA_TRACE
+	wpa_trace_show("eloop: could not process SIGINT or SIGTERM in two seconds");
+#endif
 	exit(1);
 }
 #endif /* CONFIG_NATIVE_WINDOWS */
-- 
2.50.1




More information about the Hostap mailing list