mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 13:19:31 +00:00
signal SIGINT: map SIGINT to watchdog reset
Map SIGINT(2) to watchdog reset. NOTE: We required guest to do a full reset after detect the recent last reset type is watchdog. This is used to resume the passthru devices in UOS. Tracked-On: #3103 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
634e310f9b
commit
f2d654cc44
@@ -678,8 +678,9 @@ num_vcpus_allowed(struct vmctx *ctx)
|
||||
static void
|
||||
sig_handler_term(int signo)
|
||||
{
|
||||
printf("Receive SIGINT to terminate application...\n");
|
||||
vm_set_suspend_mode(VM_SUSPEND_POWEROFF);
|
||||
printf("Receive SIGINT to full reset application...\n");
|
||||
vm_set_watchdog_bite();
|
||||
vm_set_suspend_mode(VM_SUSPEND_FULL_RESET);
|
||||
mevent_notify();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user