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] libxenlight: fix dm_xenstore_record_pid

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxenlight: fix dm_xenstore_record_pid
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 2 Dec 2009 14:51:22 +0000
Delivery-date: Wed, 02 Dec 2009 06:48:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
the function dm_xenstore_record_pid is executed by a child of the main
process and therefore shouldn't use the same xenstore connection:
currently it opens a new connection but still uses the old one.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 40077a808001 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Dec 02 12:20:05 2009 +0000
+++ b/tools/libxl/libxl.c       Wed Dec 02 14:29:20 2009 +0000
@@ -663,10 +663,10 @@
     /* we mustn't use the parent's handle in the child */
 
     kvs[0] = "image/device-model-pid";
-    kvs[1] = libxl_sprintf(ctx, "%d", innerchild);
+    kvs[1] = libxl_sprintf(&clone, "%d", innerchild);
     kvs[2] = NULL;
-    rc = libxl_xs_writev(ctx, XBT_NULL, starting->dom_path, kvs);
-    if (rc) XL_LOG_ERRNO(ctx, XL_LOG_ERROR,
+    rc = libxl_xs_writev(&clone, XBT_NULL, starting->dom_path, kvs);
+    if (rc) XL_LOG_ERRNO(&clone, XL_LOG_ERROR,
                          "Couldn't record device model pid %ld at %s/%s",
                          (unsigned long)innerchild, starting->dom_path, kvs);
     xs_daemon_close(clone.xsh);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxenlight: fix dm_xenstore_record_pid, Stefano Stabellini <=