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 20 of 26] xl: free all data on exit from the domain m

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 20 of 26] xl: free all data on exit from the domain monitor daemon
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 16 Aug 2010 15:33:44 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 16 Aug 2010 07:55:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1281969204@xxxxxxxxxxxxxxxxxxxxx>
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
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281969065 -3600
# Node ID dd25ac29c0f74a2d909df3e3d072ed5d59320312
# Parent  a33d1901115bfeceab9cad25954472acdd475744
xl: free all data on exit from the domain monitor daemon.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r a33d1901115b -r dd25ac29c0f7 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Mon Aug 16 15:31:05 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Mon Aug 16 15:31:05 2010 +0100
@@ -1581,9 +1581,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:
@@ -1601,6 +1603,8 @@ start:
                         goto start;
                     case 0:
                         LOG("Done. Exiting now");
+                        ret = 0;
+                        goto out;
                         exit(0);
                     }
                 }
@@ -1612,9 +1616,6 @@ start:
         }
         libxl_free_event(&event);
     }
-
-    close(logfile);
-    exit(0);
 
 error_out:
     if (domid)

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

<Prev in Thread] Current Thread [Next in Thread>