From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: Unexpected error: exceptions.OSError Date: Fri, 14 Mar 2008 14:45:56 +0000 Message-ID: <20080314144556.GU4358@implementation.uk.xensource.com> References: <38AD81989214D54EB5F20C69477AF6C105C4FD2B@xmb-sjc-217.amer.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <38AD81989214D54EB5F20C69477AF6C105C4FD2B@xmb-sjc-217.amer.cisco.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Phil Winterfield (winterfi)" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hello, Phil Winterfield (winterfi), le Thu 13 Mar 2008 15:45:03 -0700, a écrit : > (p, rv) = os.waitpid(cpid, os.WNOHANG) > > OSError: [Errno 10] No child processes Mmm, I think that may happen e.g. if the creation doesn't exit but gets a signal, because in the loop we only test WIFEXITED(). If think maybe we should rather if os.WIFEXITED(): if os.WEXITSTATUS(rv) != 0: sys.exit(os.WEXITSTATUS(rv)) elif os.WIFSIGNALED(status): print ("got signal %d" % os.WTERMSIG(rv)) sys.exit(1) elif os.WIFSTOPPED(status): print ("got stopped with signal %d" % os.WSTOPSIG(rv)) sys.exit(1) elif os.WIFCONTINUED(status): print ("continued") sys.exit(1) To make sure that we properly exit() and return appropriate error message. Samuel