[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xl: do not return to caller from monitoring daemon



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1283959460 -3600
# Node ID fc866633d0ebb7b0982c5d5ddd62d3a7a70e6d5b
# Parent  cd87550cea5e69fda4ae0f7719c3dcfb09dbc40a
xl: do not return to caller from monitoring daemon

The parent process will have returned to the caller and done whatever
is necessary. The daemon should not return otherwise it will repeat
this work. In the case of the migration receiver this causes it to try
and take part in the migration protocol long after the sender+parent
process have completed it, leading to confusing error messages
(although strangely not much actual damange).

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

diff -r cd87550cea5e -r fc866633d0eb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Sep 07 19:17:16 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Wed Sep 08 16:24:20 2010 +0100
@@ -1645,6 +1645,14 @@ waitpid_out:
     if (child_console_pid > 0 &&
             waitpid(child_console_pid, &status, 0) < 0 && errno == EINTR)
         goto waitpid_out;
+
+    /*
+     * If we have daemonized then do not return to the caller -- this has
+     * already happened in the parent.
+     */
+    if ( !need_daemon )
+        exit(ret);
+
     return ret;
 }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.