Ticket #5683 (new enhancement)
Opened 4 years ago
Configurable actions on signals
|Reported by:||ae3265||Owned by:|
|Version:||VirtualBox 3.1.0||Keywords:||sigterm launchd osx|
|Host type:||Mac OS X|
Please see my last post in this thread for background:
In OS X, launchd uses SIGTERM to stop running processes. If VirtualBox trapped signals (SIGTERM, HUP, etc.), then launchd items could be created to cleanly shutdown running VM's for those of use using VB with headless mode with OS X in more of a "server" mode. I believe once the signals are trapped, that the launchd plists have sufficient options to deal with the time it takes to process various shutdown options.
Best would be to have a setting in VB that would allow user-configurable actions based on the signal received. For example, I might want HUP to suspend the VM and SIGTERM to run acpipoweroff...or HUP to acpipoweroff and SIGTERM to poweroff.
Ideally, this setting will be in the VM settings and work whether the VM is started with VBoxHeadless or from the GUI.
As it is, working around this without the capability to handle signals, particularly SIGTERM, with OS X's launchd leaves some doubt as to complete and clean shutdown of VM's upon system reboot/shutdown.
I'm more than happy to help out with testing under 10.5/10.6 on my lab machines. Thanks!