WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] tools/hotplug/Linux: forced to release lock if h

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tools/hotplug/Linux: forced to release lock if holder process is gone
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 14 Dec 2010 17:16:37 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Dec 2010 09:17:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7kk4jchhpw.fsf@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <7kk4jchhpw.fsf@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Kouya Shimura writes ("[Xen-devel] [PATCH] tools/hotplug/Linux: forced to 
release lock if holder process is gone"):
> When a script using locking.sh is stopped by ctrl-C, the lock file remains.
> We have to wait 100 seconds for releasing the lock at the next time.

Thanks, I have applied your patch.

This kind of thing is one reason why lockfiles where the lock is
regarded as held if the file exists are horrible.  It's a shame that
we don't have any fcntl/flock style locking primitives available in
shell.

Ian.

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