VirtualBox

Opened 14 years ago

Last modified 9 years ago

#5683 new enhancement

Configurable actions on signals

Reported by: ae3265 Owned by:
Component: VM control Version: VirtualBox 3.1.0
Keywords: sigterm launchd osx Cc:
Guest type: other Host type: Mac OS X

Description

Please see my last post in this thread for background:

http://forums.virtualbox.org/viewtopic.php?f=8&t=24244&p=114221#p114221

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!

Change History (1)

comment:1 by AnrDaemon, 9 years ago

Please add signal mapping to VBoxHeadless.

I would prefer the following mapping:

SIGTERM = savestate
SIGUSR1 = acpipowerbutton
SIGUSR2 = acpisleepbutton

The argument is quite simple. SIGTERM is a more universal signal, that maps to a more universal action. USR? signals are by definition application specific, and the guest reaction to them is not easily predictable.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use