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-changelog

[Xen-changelog] [xen-unstable] xl: free all data on exit from the domain

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: free all data on exit from the domain monitor daemon.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Aug 2010 03:30:30 -0700
Delivery-date: Thu, 26 Aug 2010 03:31:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1282225224 -3600
# Node ID 3a4c6c054b29d0ee61016ca25feba0de593e67e2
# Parent  6bd04080ab998dd9d5388f1b5f74eab07df519db
xl: free all data on exit from the domain monitor daemon.

[PATCH 01 of 16
 libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff -r 6bd04080ab99 -r 3a4c6c054b29 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed Aug 18 18:06:10 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Thu Aug 19 14:40:24 2010 +0100
@@ -1557,9 +1557,11 @@ start:
                 if (ret) {
                     switch (handle_domain_death(&ctx, domid, &event, 
&d_config, &info)) {
                     case 2:
-                        if (!preserve_domain(&ctx, domid, &event, &d_config, 
&info))
+                        if (!preserve_domain(&ctx, domid, &event, &d_config, 
&info)) {
                             /* If we fail then exit leaving the old domain in 
place. */
-                            exit(-1);
+                            ret = -1;
+                            goto out;
+                        }
 
                         /* Otherwise fall through and restart. */
                     case 1:
@@ -1577,7 +1579,8 @@ start:
                         goto start;
                     case 0:
                         LOG("Done. Exiting now");
-                        exit(0);
+                        ret = 0;
+                        goto out;
                     }
                 }
                 break;
@@ -1589,13 +1592,13 @@ start:
         libxl_free_event(&event);
     }
 
-    close(logfile);
-    exit(0);
-
 error_out:
     if (domid)
         libxl_domain_destroy(&ctx, domid, 0);
+
 out:
+    if (logfile != 2)
+        close(logfile);
 
     free_domain_config(&d_config);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xl: free all data on exit from the domain monitor daemon., Xen patchbot-unstable <=