WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Unexpected error: exceptions.OSError

To: "Phil Winterfield (winterfi)" <winterfi@xxxxxxxxx>
Subject: Re: [Xen-devel] Unexpected error: exceptions.OSError
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Fri, 14 Mar 2008 14:45:56 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Mar 2008 07:47:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <38AD81989214D54EB5F20C69477AF6C105C4FD2B@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, "Phil Winterfield (winterfi)" <winterfi@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <38AD81989214D54EB5F20C69477AF6C105C4FD2B@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>