|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 2 of 4] xl: do not return to caller from monitoring d
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1283766891 -3600
# Node ID 5f96f36feebdb87eaadbbcab0399f32eda86f735
# Parent cbba0599e0a1728e524ba640bdcea7d4af05ddd5
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>
diff -r cbba0599e0a1 -r 5f96f36feebd tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Mon Sep 06 10:54:51 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c Mon Sep 06 10:54:51 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|