From: Benjamin Berg Date: Wed, 30 Jul 2025 12:44:41 +0000 (+0200) Subject: eloop: Dump a trace when exiting due to SIGALRM X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=289ec0bdfd03dce60853db0b840b185312aba4ff;p=thirdparty%2Fhostap.git eloop: Dump a trace when exiting due to SIGALRM 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 --- diff --git a/src/utils/eloop.c b/src/utils/eloop.c index 00b0beff0..b4ad8b824 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 /* WPA_TRACE */ exit(1); } #endif /* CONFIG_NATIVE_WINDOWS */