From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [RFC][PATCH] Use ioemu block drivers through blktap Date: Mon, 31 Mar 2008 11:10:06 +0200 Message-ID: <47F0AA6E.2050909@suse.de> References: <47D569F6.1010209@suse.de> <47D91D3D.1000005@suse.de> <18413.3411.635161.295233@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18413.3411.635161.295233@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ian Jackson schrieb: > Sorry for picking this up now, but I'm trying to reconcile ioemu with > qemu and I wondered what the purpose of these changes was: > >> +static void qemu_sighup_handler(int signal) >> +{ >> + fprintf(stderr, "Received SIGHUP, terminating.\n"); >> + exit(0); >> +} >> + > >> - signal(SIGHUP, SIG_DFL); >> + signal(SIGHUP, qemu_sighup_handler); I needed a shutdown handler to properly close the blktap connection and delete the named pipes associated with the qemu-dm instance. When a domain is destroyed, qemu-dm receives a SIGHUP. However, with the default SIGHUP handler no atexit functions are called, so I had to add this handler which performs a clean exit. Kevin