diff --git a/tools/python/xen/util/xpopen.py b/tools/python/xen/util/xpopen.py index 78bbefdd2c..b0c880fafe 100644 --- a/tools/python/xen/util/xpopen.py +++ b/tools/python/xen/util/xpopen.py @@ -129,7 +129,7 @@ class xPopen3: try: os.execvp(cmd[0], cmd) finally: - os._exit(1) + os._exit(127) def poll(self): """Return the exit status of the child process if it has finished, diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 2320e8758d..2df4f48d97 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -392,6 +392,8 @@ class XendDomain: if filter(lambda (fd, event): event & select.POLLHUP, r): break + if child.wait() >> 8 == 127: + lasterr = "popen %s failed" % PATH_XC_RESTORE if child.wait() != 0: raise XendError("xc_restore failed: %s" % lasterr)