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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Handle terminating signals.
Date: Tue, 12 Aug 2008 14:49:41 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

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.

Note my previous suggestion of pipe() + fork() gives you the desired cleanup behaviour without having to deal with any of this silliness. IMHO, the real problem here is that Xen's domain-0 interface isn't based on file descriptors to begin with. What modern Linux interface that requires a clean-up action isn't, afterall?

Regards,

Anthony Liguori

cheers,
  Gerd






reply via email to

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