Unix signal to send ACPI-shutdown to Guest
Ive been looking into the possibility of using a unix signal to send an acpi shutdown request to a VM, and came across a posting on this l in March 1. See https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg04169.html
To summarise to refresh memories there was a patch proposed using SIGINT followed by discussion as to why SIGINT wasnt ideal because it would cause regressions for anyone relying on the existing handling of SIGINT, and various other signals were considered including HUP & USR1 & USR2 all of which are already used for something else.
Is SIGPWR a suitable candidate, I have made a patch to use SIGPWR but as Im new to QEMUs internals Im not sure if there are any circumstances in which an alternative handler is registered for SIGPWR which might conflict?
Regards
Andrew
Quoted 11 lines · Andrew Wood via Qemu-devel
Ive been looking into the possibility of using a unix signal to send an acpi shutdown request to a VM, and came across a posting on this l in March 1. See https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg04169.html
To summarise to refresh memories there was a patch proposed using SIGINT followed by discussion as to why SIGINT wasnt ideal because it would cause regressions for anyone relying on the existing handling of SIGINT, and various other signals were considered including HUP & USR1 & USR2 all of which are already used for something else.
Quoted 3 lines
Is SIGPWR a suitable candidate, I have made a patch to use SIGPWR but as Im new to QEMUs internals Im not sure if there are any circumstances in which an alternative handler is registered for SIGPWR which might conflict?
A quick grep of the Linux kernel code suggests that SIGPWR is very rarely raised by the kernel. It's only sent to init on s390 and Silicon Graphics SN systems. QEMU could use the signal on Linux without risk of collision.
It's worth sending a patch. Here are the patch submission guidelines:
https://wiki.qemu.org/Contribute/SubmitAPatch
Stefan