Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main-loop.c: Handle SIGINT, SIGHUP and SIGTERM synchronously
Add the termination signals SIGINT, SIGHUP and SIGTERM to the list of signals which we handle synchronously via a signalfd. This avoids a race condition where if we took the SIGTERM in the middle of qemu_shutdown_requested: int r = shutdown_requested; [SIGTERM here...] shutdown_requested = 0; then the setting of the shutdown_requested flag by termsig_handler() would be lost and QEMU would fail to shut down. This was causing 'make check' to hang occasionally. Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Tested-by: Alex Bennée <[email protected]> Message-id: [email protected] Cc: [email protected]
- Loading branch information