From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSdLt-0000Yy-NQ for qemu-devel@nongnu.org; Mon, 11 Aug 2008 15:46:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSdLs-0000Wo-Kt for qemu-devel@nongnu.org; Mon, 11 Aug 2008 15:46:48 -0400 Received: from [199.232.76.173] (port=37662 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSdLs-0000WY-9g for qemu-devel@nongnu.org; Mon, 11 Aug 2008 15:46:48 -0400 Received: from mx1.redhat.com ([66.187.233.31]:34153) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSdLs-0001sG-5Y for qemu-devel@nongnu.org; Mon, 11 Aug 2008 15:46:48 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m7BJklf6003987 for ; Mon, 11 Aug 2008 15:46:47 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m7BJkhAK001030 for ; Mon, 11 Aug 2008 15:46:44 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-94.str.redhat.com [10.32.4.94]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m7BJkg4a003622 for ; Mon, 11 Aug 2008 15:46:43 -0400 Message-ID: <48A09722.3060106@redhat.com> Date: Mon, 11 Aug 2008 21:46:42 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Handle terminating signals. References: <48998F9E.90206@redhat.com> <18592.28256.85302.846876@mariner.uk.xensource.com> In-Reply-To: <18592.28256.85302.846876@mariner.uk.xensource.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Ian Jackson wrote: > Gerd Hoffmann writes ("[Qemu-devel] [PATCH] Handle terminating signals."): >> This patch makes qemu handle signals better. For normal signals >> (SIGINT, SIGTERM & friends) it just sets the request_shutdown flag, >> making the main_loop exit and qemu taking the usual exit route, with >> atexit handlers being called and so on, instead of qemu just being >> killed by the signal. >> >> + sigaction(SIGINT, &act, NULL); >> + sigaction(SIGHUP, &act, NULL); >> + sigaction(SIGTERM, &act, NULL); >> + sigaction(SIGQUIT, &act, NULL); > > SIGQUIT should not be in this list. QUIT does not mean `please > terminate'. It's a signal used for debugging purposes and usually > means `please pretend this program took a SEGV'. The default action > is to die and dump core, and this should be preserved. Ok, we could take the SIGSEGV cleanup route, then call abort(). That should come close enougth. Does that sound ok? cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/