diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-09-08 16:24:20 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-09-08 16:24:20 +0100 |
commit | 77a0acea701ed303efd11ef43c64345a7e32ce77 (patch) | |
tree | 425bf81617a52caf7caa3f0c0ce4339295e672b1 | |
parent | 8b1e566cb2732b0723124a1dd096eda697bbfb3e (diff) | |
download | xen-77a0acea701ed303efd11ef43c64345a7e32ce77.tar.gz xen-77a0acea701ed303efd11ef43c64345a7e32ce77.tar.bz2 xen-77a0acea701ed303efd11ef43c64345a7e32ce77.zip |
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@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 9393059e71..c2bfa0d311 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -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; } |