[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a sign
From: |
Gleb Natapov |
Subject: |
Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal |
Date: |
Wed, 30 Mar 2011 20:51:46 +0200 |
On Wed, Mar 30, 2011 at 01:49:10PM -0500, Anthony Liguori wrote:
> On 03/30/2011 01:39 PM, Peter Maydell wrote:
> >On 15 March 2011 11:56, Gleb Natapov<address@hidden> wrote:
> >>Currently when rogue script kills QEMU process (using TERM/INT/HUP
> >>signal) it looks indistinguishable from system shutdown. Lets report
> >>that QEMU was killed and leave some clues about the killer identity.
> >Unfortunately this patch causes qemu to segfault when killed
> >via ^C (at least on my Ubuntu maverick system). This is because
> >it registers a signal handler with sigaction, but then later
> >the SDL library is initialised and it reinstalls our handler
> >with plain old signal:
> >
> > ohandler = signal(SIGINT, SDL_HandleSIG);
> > if ( ohandler != SIG_DFL )
> > signal(SIGINT, ohandler);
> >
> >This is clearly buggy but on the other hand SDL is pretty widely
> >deployed and it's the default QEMU video output method, so I think
> >we need to work around it :-(
> >
> >The most straightforward fix is to get the signal number from
> >argument one and not to bother printing the PID that killed us.
>
> Or just #ifdefing this to 0 for now and then once an SDL version is
> released that works correctly, adding an appropriate guard.
>
I prefer to move signal init after SDL init.
--
Gleb.
- Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal, (continued)
Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal, Peter Maydell, 2011/03/30
Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal, Anthony Liguori, 2011/03/30
- Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal,
Gleb Natapov <=
Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal, malc, 2011/03/30