qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Handle terminating signals.


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] Handle terminating signals.
Date: Wed, 13 Aug 2008 09:27:47 +0100
User-agent: Mutt/1.4.1i

On Tue, Aug 12, 2008 at 09:42:07PM +0200, Gerd Hoffmann wrote:
> M. Warner Losh wrote:
> > In message: <address@hidden>
> >             Gerd Hoffmann <address@hidden> writes:
> > : > No, because the program should not attempt to catch SEGV either.
> > : 
> > : Why not?  Can you change your attitude to say "no" without giving
> > : reasons please?
> > 
> > The only portable thing one can do when catching SEGV is terminate the
> > program.  Otherwise, when the signal handler returns, SEGV happens
> > again...
> 
> Returning from the signal handler isn't going to work, sure.  The only
> thing I want do is cleaning up before exiting.
> 
> Most apps never ever have to care about that.  Sometimes there are good
> reasons to attempt a cleanup even for a SEGV though.  The X-Server for
> example attempts to put the gfx card into a sane state then.

The X server often fails to do this cleanup. This is why they're moving
mode setting into the kernel so it can be *reliably* reset. Relying on
a SEGV handler for cleanup is just doomed to fail

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]