# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1186659366 -32400 # Node ID 2558fdeb290718c3f361f6913fc41c9a86da872b # Parent f18667f3d03d79c75ae0fb1a313a10357510aca1 retry destroy domain hypercall until success. PATCHNAME: retry_destroy_domain_hypercall_until_success Signed-off-by: Isaku Yamahata diff -r f18667f3d03d -r 2558fdeb2907 tools/libxc/xc_domain.c --- a/tools/libxc/xc_domain.c Thu Aug 09 17:25:50 2007 +0900 +++ b/tools/libxc/xc_domain.c Thu Aug 09 20:36:06 2007 +0900 @@ -55,10 +55,17 @@ int xc_domain_destroy(int xc_handle, int xc_domain_destroy(int xc_handle, uint32_t domid) { + int ret; DECLARE_DOMCTL; domctl.cmd = XEN_DOMCTL_destroydomain; domctl.domain = (domid_t)domid; - return do_domctl(xc_handle, &domctl); + for (;;) { + ret = do_domctl(xc_handle, &domctl); + if (ret && errno == -EAGAIN) + continue; + break; + } + return ret; } int xc_domain_shutdown(int xc_handle,