tools/xl: fix race which can leave an xl monitor processing hanging
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 16 Dec 2010 17:39:24 +0000 (17:39 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 16 Dec 2010 17:39:24 +0000 (17:39 +0000)
If the domain is destroyed (eg with xl destroy), it is possible that
the xl which is monitoring the domain for restart/preserve will not be
able to get the domain shutdown reason.

Before this patch, it would then ignore the domain death event and
carry on waiting, forever, for more events.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c

index a0d5da0826cfd9d3ba3e7ed0d9b30a3ad83ca788..33a54033b1d93e35b741354f67599b54a699dec9 100644 (file)
@@ -1848,6 +1848,9 @@ start:
                         ret = 0;
                         goto out;
                     }
+                } else {
+                    LOG("Unable to get domain death info, quitting");
+                    goto out;
                 }
                 break;
             case LIBXL_EVENT_DISK_EJECT: