Record the received number before setting the exit trigger, so it will definitely be available for reporting (#187).

This commit is contained in:
Andrew Wood
2026-04-28 22:55:16 +01:00
parent 478039f539
commit a3f0caeab4
+3 -2
View File
@@ -300,14 +300,15 @@ static void pv_sig_winch( /*@unused@ */ __attribute__((unused))
/*
* Handle termination signals by setting the abort flag.
* Handle termination signals by recording which one was received, and then
* setting the abort flag.
*/
static void pv_sig_term(int s)
{
if (NULL == pv_sig_state)
return;
pv_sig_state->flags.trigger_exit = 1;
pv_sig_state->flags.terminating_signal = (sig_atomic_t) s;
pv_sig_state->flags.trigger_exit = 1;
}