From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQPuc-0004GJ-GH for qemu-devel@nongnu.org; Tue, 05 Aug 2008 13:01:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQPub-0004F7-KC for qemu-devel@nongnu.org; Tue, 05 Aug 2008 13:01:30 -0400 Received: from [199.232.76.173] (port=34146 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQPub-0004Em-EW for qemu-devel@nongnu.org; Tue, 05 Aug 2008 13:01:29 -0400 Received: from mx1.redhat.com ([66.187.233.31]:52040) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQPua-0007ct-VO for qemu-devel@nongnu.org; Tue, 05 Aug 2008 13:01:29 -0400 Date: Tue, 5 Aug 2008 18:00:48 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH] catch signals Message-ID: <20080805170048.GY6570@redhat.com> References: <48987B43.4090207@redhat.com> <20080805163519.GV6570@redhat.com> <20080805165321.GZ4478@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20080805165321.GZ4478@implementation.uk.xensource.com> Content-Transfer-Encoding: quoted-printable Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: qemu-devel@nongnu.org On Tue, Aug 05, 2008 at 05:53:21PM +0100, Samuel Thibault wrote: > Daniel P. Berrange, le Tue 05 Aug 2008 17:35:19 +0100, a =E9crit : > > I think rather than trying todo anything in the signal handler, > > it is safest to just set a flag and have its state checked > > and acted upon in the main loop. >=20 > We can not do that for SIGSEGV/SIGBUS, however. We shouldn't be trying todo anything for SEGV/BUS. It is basically game over at that point - you've no chance of orderly shutdown. Only QUIT, INT= , TERM, HUP should be trying todo graceful shutdown, because those don't imply your process is corrupting its memory/ doing bad stuff. Daniel --=20 |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange= / :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 950= 5 :|