qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: malc <av1474@comtv.ru>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal
Date: Thu, 31 Mar 2011 07:35:39 +0200	[thread overview]
Message-ID: <20110331053539.GA24181@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1103310134520.2206@linmac>

On Thu, Mar 31, 2011 at 01:35:31AM +0400, malc wrote:
> On Wed, 30 Mar 2011, Peter Maydell wrote:
> 
> > On 15 March 2011 11:56, Gleb Natapov <gleb@redhat.com> 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.
> > 
> 
> Maybe using SDL_INIT_NOPARACHUTE is worth doing?
> 
We do it already, but SDL mangles signal handlers anyway. The funny
thing is that parachute code actually correctly use sigaction when
available.

--
			Gleb.

      reply	other threads:[~2011-03-31  5:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 11:56 [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal Gleb Natapov
2011-03-25 12:04 ` Gleb Natapov
2011-03-26 13:50   ` Blue Swirl
2011-03-26 13:55     ` Gleb Natapov
2011-03-26 14:12       ` Blue Swirl
2011-03-30 18:39 ` Peter Maydell
2011-03-30 18:43   ` Gleb Natapov
2011-03-30 18:53     ` Peter Maydell
2011-03-30 19:04       ` Gleb Natapov
2011-03-30 20:51         ` Peter Maydell
2011-03-31  9:04           ` Gleb Natapov
2011-03-30 18:49   ` Anthony Liguori
2011-03-30 18:51     ` Gleb Natapov
2011-03-30 21:35   ` malc
2011-03-31  5:35     ` Gleb Natapov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110331053539.GA24181@redhat.com \
    --to=gleb@redhat.com \
    --cc=av1474@comtv.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).