]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
eloop: Dump a trace when exiting due to SIGALRM
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 30 Jul 2025 12:44:41 +0000 (14:44 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Dec 2025 16:45:00 +0000 (18:45 +0200)
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@intel.com>
src/utils/eloop.c

index 00b0beff0b78a5577f94ebb39fca7a74f7ad0c30..b4ad8b8241f87f11bb97c46ebd15a210cd891d3d 100644 (file)
@@ -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 */