From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSj4x-0006BS-Pk for qemu-devel@nongnu.org; Mon, 11 Aug 2008 21:53:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSj4v-00067p-Pr for qemu-devel@nongnu.org; Mon, 11 Aug 2008 21:53:43 -0400 Received: from [199.232.76.173] (port=46783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSj4v-00067h-N5 for qemu-devel@nongnu.org; Mon, 11 Aug 2008 21:53:41 -0400 Received: from ag-out-0708.google.com ([72.14.246.251]:32383) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSj4v-00021d-GU for qemu-devel@nongnu.org; Mon, 11 Aug 2008 21:53:41 -0400 Received: by ag-out-0708.google.com with SMTP id 31so185957agc.5 for ; Mon, 11 Aug 2008 18:53:40 -0700 (PDT) Message-ID: <48A0ECFE.2040703@codemonkey.ws> Date: Mon, 11 Aug 2008 20:53:02 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 01/11] Handle terminating signals. References: <1218457970-11707-1-git-send-email-kraxel@redhat.com> <1218457970-11707-2-git-send-email-kraxel@redhat.com> <48A0933D.5070108@codemonkey.ws> <48A099ED.6050303@redhat.com> In-Reply-To: <48A099ED.6050303@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 Cc: xen-devel@lists.xensource.com Gerd Hoffmann wrote: > Anthony Liguori wrote: > >> Gerd Hoffmann wrote: >> >>> +void fatalsig_register_handler(void (*func)(void)); >>> >>> >> Unless I'm misreading, none of your patches seem to use this function. >> What are you adding this mechanism for? >> > > The patch using that isn't fully polished yet for submission. Sneak > preview is here: > > http://kraxel.fedorapeople.org/patches/qemu-upstream/0015-xen-domain-builder.patch > > Adds pv domain builder to qemu, so you can start pv xen guests using > qemu only. In that case we'll want to destroy the guest domain when > qemu goes down because the xen management stack will not cleanup after us. > I was asking because I thought it may be something like this. An alternative to this signal handler stuff would be to fork() off a process with another end of a pipe. That process could just sit their waiting for eof and when eof was received, it could destroy the domain. The main advantage of this approach is that it works in every possible circumstance. Even if the qemu process totally borks it's stack or tramples over memory in such a way as to render the signal handling code broken. Regards, Anthony Liguori > cheers, > Gerd > >