AP_HAL_SITL: catch more signal for correct exit

SIGINT is for ctrl-c
SIGHUP and SIGQUIT are use within term. If the term close before SITL, it will trigger one of those and then exit cleanly anyway
This commit is contained in:
Pierre Kancir 2021-08-15 22:36:18 +02:00 committed by Peter Barker
parent 78c4918b32
commit 6584fef711

View File

@ -170,6 +170,12 @@ void HAL_SITL::setup_signal_handlers() const
sa.sa_flags = SA_NOCLDSTOP;
sa.sa_handler = HAL_SITL::exit_signal_handler;
sigaction(SIGTERM, &sa, NULL);
#if defined(HAL_COVERAGE_BUILD) && HAL_COVERAGE_BUILD == 1
sigaction(SIGINT, &sa, NULL);
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGQUIT, &sa, NULL);
#endif
}
/*