mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1528 (4292fdfc5zZkxl3RcxrdBZCU6Rd8EA)
XendDomain.py: Handle error case where exec fails. xpopen.py: Exit with 127 if exec fails. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
e8968bea9c
commit
a5a8a98d1f
2 files changed
+3
-1
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||