From: Kevin Day Date: Fri, 24 Jan 2025 03:00:00 +0000 (-0600) Subject: Update: The threaded signal handler to avoid signal id races. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=22b3dde135f19f655054414ec5752b260c7023ed;p=control Update: The threaded signal handler to avoid signal id races. Apply the same anti-race improvements implemented on the non-threaded signal checker to the threaded signal checker. Still check for a negative id to prevent the signal message from being printed more than once. --- diff --git a/sources/c/program/control/main/signal.c b/sources/c/program/control/main/signal.c index c99735a..6a577a7 100644 --- a/sources/c/program/control/main/signal.c +++ b/sources/c/program/control/main/signal.c @@ -29,7 +29,7 @@ extern "C" { #if !defined(_di_control_signal_check_) && !defined(_di_thread_support_) f_status_t control_signal_check(control_main_t * const main) { - if (!main || main->program.signal.id == -1) return F_false; + if (!main) return F_false; if (main->program.signal_received) { fll_program_print_signal_received(&main->program.warning, main->program.signal_received);