Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] [RFC][PATCH] Use ioemu block drivers through blktap

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC][PATCH] Use ioemu block drivers through blktap
From: Kevin Wolf <kwolf@xxxxxxx>
Date: Mon, 31 Mar 2008 11:10:06 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 31 Mar 2008 02:15:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <18413.3411.635161.295233@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47D569F6.1010209@xxxxxxx> <47D91D3D.1000005@xxxxxxx> <18413.3411.635161.295233@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20060911)
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel