On 6 Mar, 16:39, "Paolo Pantaleo" <[EMAIL PROTECTED]> wrote: > > The os.system() (but all the other funciont with similar behavior) reports > wrong exit status. I can reproduce the bug in the following way
I think you should look at some previous threads related to this (obtained by searching Google Groups for "os.system exit status code"): "grabbing return codes from os.system() call" http://groups.google.com/group/comp.lang.python/browse_frm/thread/efeab8a50ff16975/ "please help me understand os.system() result" http://groups.google.com/group/comp.lang.python/browse_frm/thread/4a9ab6d5a609e9ca/ "os.system() << 8 ?" http://groups.google.com/group/comp.lang.python/browse_frm/thread/f12ccab6389f482c/ In short, the returned code is actually a combination of two values, and you need to extract the expected status code by shifting the result 8 bits to the right. It may actually be more complicated than that, but the man page for system ("man 3 system") explains this in more detail. Paul -- http://mail.python.org/mailman/listinfo/python-list