From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Handle terminating signals.
Date: Tue, 12 Aug 2008 14:49:41 -0500 [thread overview]
Message-ID: <48A1E955.70406@codemonkey.ws> (raw)
In-Reply-To: <48A1E78F.8000808@redhat.com>
Gerd Hoffmann wrote:
> M. Warner Losh wrote:
>
>> In message: <48A1D6A3.4050406@redhat.com>
>> Gerd Hoffmann <kraxel@redhat.com> 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
>
>
next prev parent reply other threads:[~2008-08-12 19:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 11:48 [Qemu-devel] [PATCH] Handle terminating signals Gerd Hoffmann
2008-08-11 16:52 ` Ian Jackson
2008-08-11 19:46 ` Gerd Hoffmann
2008-08-12 10:05 ` Ian Jackson
2008-08-12 11:46 ` Stefano Stabellini
2008-08-12 18:29 ` Gerd Hoffmann
2008-08-12 19:29 ` M. Warner Losh
2008-08-12 19:42 ` Gerd Hoffmann
2008-08-12 19:49 ` Anthony Liguori [this message]
2008-08-13 8:27 ` Daniel P. Berrange
2008-08-13 13:29 ` Ian Jackson
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=48A1E955.70406@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kraxel@redhat.com \
--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).