Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 07/04/2017 05:09, Eric Blake wrote: > >> qemu_kill_report() is already able to tell whether a shutdown >> was triggered by guest action (no output) or by a host signal >> (a message about termination is printed via error_report); but >> this information is then lost. L

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Paolo Bonzini
On 07/04/2017 05:09, Eric Blake wrote: > ## > +# @ShutdownSignal: > +# > +# The list of host signal types known to cause qemu to shut down a guest. > +# > +# @int: SIGINT > +# @hup: SIGHUP > +# @term: SIGTERM > +# > +# Since: 2.10 > +## > +{ 'enum': 'ShutdownSignal', 'data': [ 'int', 'hup', 'ter

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Paolo Bonzini
On 12/04/2017 19:02, Markus Armbruster wrote: >> Note that mingw lacks decent signal >> support, and will never report a signal because it never calls >> qemu_system_killed(). > > Awkward. ISO C trivia of the day: "kill" is only a POSIX function. > os-posix.c arranges

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Paolo Bonzini
On 07/04/2017 17:35, Daniel P. Berrange wrote: > Is it conceivable that we find a non-signal based way to distinguish > guest initiated shutdown, from host OS initiated kill when on Win32 ? As far as I know there's no such thing as a "soft kill" (SIGTERM) on Win32, since there is no kill functio

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 09:33 AM, Markus Armbruster wrote: >>> Additional ways to terminate QEMU: HMP and QMP command "quit", and the >>> various GUI controls such "close SDL window". >> >> Good points. I have no idea what exit path those take (if they >> raise(SIGINT) internally, it's quite easy - but if t

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > On 04/12/2017 08:52 AM, Markus Armbruster wrote: In other words, these three signals are polite requests to terminate QEMU. Stefan, are there equivalent requests under Windows? I guess there might be one at least for SIGINT, namely whatever happens w

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 08:52 AM, Markus Armbruster wrote: >>> In other words, these three signals are polite requests to terminate >>> QEMU. >>> >>> Stefan, are there equivalent requests under Windows? I guess there >>> might be one at least for SIGINT, namely whatever happens when you hit >>> ^C on the co

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > On 04/12/2017 06:02 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> qemu_kill_report() is already able to tell whether a shutdown >>> was triggered by guest action (no output) or by a host signal >>> (a message about termination is printed via error_report); but >

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Eric Blake
On 04/12/2017 06:02 AM, Markus Armbruster wrote: > Eric Blake writes: > >> qemu_kill_report() is already able to tell whether a shutdown >> was triggered by guest action (no output) or by a host signal >> (a message about termination is printed via error_report); but >> this information is then l

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Daniel P. Berrange
On Wed, Apr 12, 2017 at 01:02:02PM +0200, Markus Armbruster wrote: > Eric Blake writes: > > > qemu_kill_report() is already able to tell whether a shutdown > > was triggered by guest action (no output) or by a host signal > > (a message about termination is printed via error_report); but > > this

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-12 Thread Markus Armbruster
Eric Blake writes: > qemu_kill_report() is already able to tell whether a shutdown > was triggered by guest action (no output) or by a host signal > (a message about termination is printed via error_report); but > this information is then lost. Libvirt would like to be able > to distinguish betw

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-07 Thread Eric Blake
On 04/07/2017 04:35 AM, Daniel P. Berrange wrote: > On Thu, Apr 06, 2017 at 04:09:17PM -0500, Eric Blake wrote: >> qemu_kill_report() is already able to tell whether a shutdown >> was triggered by guest action (no output) or by a host signal >> (a message about termination is printed via error_repo

Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-07 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 04:09:17PM -0500, Eric Blake wrote: > qemu_kill_report() is already able to tell whether a shutdown > was triggered by guest action (no output) or by a host signal > (a message about termination is printed via error_report); but > this information is then lost. Libvirt woul

[Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN

2017-04-06 Thread Eric Blake
qemu_kill_report() is already able to tell whether a shutdown was triggered by guest action (no output) or by a host signal (a message about termination is printed via error_report); but this information is then lost. Libvirt would like to be able to distinguish between a SHUTDOWN event triggered