ia64/xen-unstable

changeset 5118:242591aabc7a

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>
author cl349@firebug.cl.cam.ac.uk
date Tue May 24 10:12:12 2005 +0000 (2005-05-24)
parents 6c5699e95a56
children dd3849d6cdea
files tools/python/xen/util/xpopen.py tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/util/xpopen.py	Tue May 24 09:42:24 2005 +0000
     1.2 +++ b/tools/python/xen/util/xpopen.py	Tue May 24 10:12:12 2005 +0000
     1.3 @@ -129,7 +129,7 @@ class xPopen3:
     1.4          try:
     1.5              os.execvp(cmd[0], cmd)
     1.6          finally:
     1.7 -            os._exit(1)
     1.8 +            os._exit(127)
     1.9  
    1.10      def poll(self):
    1.11          """Return the exit status of the child process if it has finished,
     2.1 --- a/tools/python/xen/xend/XendDomain.py	Tue May 24 09:42:24 2005 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomain.py	Tue May 24 10:12:12 2005 +0000
     2.3 @@ -392,6 +392,8 @@ class XendDomain:
     2.4                  if filter(lambda (fd, event): event & select.POLLHUP, r):
     2.5                      break
     2.6  
     2.7 +            if child.wait() >> 8 == 127:
     2.8 +                lasterr = "popen %s failed" % PATH_XC_RESTORE
     2.9              if child.wait() != 0:
    2.10                  raise XendError("xc_restore failed: %s" % lasterr)
    2.11