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

[Xen-devel] [PATCH][PVFB][TOOLS] Terminate backend when frontend vanishe

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][PVFB][TOOLS] Terminate backend when frontend vanishes early
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Thu, 01 Mar 2007 21:56:59 +0100
Delivery-date: Thu, 01 Mar 2007 12:56:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Ensure the backend terminates when the frontend vanishes before the
connection is established.  This happens when the guest doesn't have
the devices.

Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
---
Note:

* Callers of xenfb_wait_for_state() already do the right thing when it
  returns XenbusStateUnknown.

* xenfb_read_state() can't return negative values.  The useless test
  is a leftover from an older version.

diff -r 2d3ceb082114 tools/xenfb/xenfb.c
--- a/tools/xenfb/xenfb.c       Mon Feb 26 09:13:50 2007 +0000
+++ b/tools/xenfb/xenfb.c       Thu Mar 01 20:57:38 2007 +0100
@@ -245,11 +246,10 @@ static int xenfb_wait_for_state(struct x
        unsigned state, dummy;
        char **vec;
 
+       awaited |= 1 << XenbusStateUnknown;
+
        for (;;) {
                state = xenfb_read_state(xsh, dir);
-               if (state < 0)
-                       return -1;
-
                if ((1 << state) & awaited)
                        return state;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][PVFB][TOOLS] Terminate backend when frontend vanishes early, Markus Armbruster <=