From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: xs_unwatch Date: Fri, 16 Aug 2013 13:00:00 +0100 Message-ID: <1376654400.6213.1.camel@hastur.hellion.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VAIhJ-0005Or-Gb for xen-devel@lists.xenproject.org; Fri, 16 Aug 2013 12:00:05 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Shakil k Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2013-08-15 at 14:52 -0700, Shakil k wrote: > Hello Xen Team, > > > I wanted to use the xenstore API to monitor the change of value for > one of the node, being written by xenstore-write. > I can use xs_watch to look for the value change in node, however if > suppose the client who is suppose to update the value to node died, so > I don't want to keep waiting forever, hence I want a timeout for > watch. > I thought probably I can do xs_unwatch after certain defined timeout > but somehow its not working. > Is there a way to specify timeout to watch, rather than just n > iterations? watches are in place until you unwatch, there is no concept of either timeouts or n-iterations. You would have to implement this in your client, by select()ing (or poll etc) on the xenstore fd with a timeout and managing the xs_unwatch yourself. Ian. > > > Thanks for the help. > > > Regards > Shakil > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel