Author pjdm
Recipients pjdm
Date 2009-08-19.08:44:47
SpamBayes Score 1.16614e-05
Marked as misclassified No
Message-id <>
Mercurial contains the code below for Posix platforms. None of the os.W*
attributes are present in Jython.

def explain_exit(code):
   """return a 2-tuple (desc, code) describing a process's status"""
   if os.WIFEXITED(code):
       val = os.WEXITSTATUS(code)
       return _("exited with status %d") % val, val
   elif os.WIFSIGNALED(code):
       val = os.WTERMSIG(code)
       return _("killed by signal %d") % val, val
   elif os.WIFSTOPPED(code):
       val = os.WSTOPSIG(code)
       return _("stopped by signal %d") % val, val
   raise ValueError(_("invalid exit code"))

Frank Wierzbicki says: "I would say that (for now) acting like being on
Jython has the same disadvantages as being on Windows is the right
approach, after all, it could be on Windows, and it is inconvenient to
check for Windows from Jython." This seems sensible to me, so a "wont
fix"/"rejected" resolution would be fine if this is not reasonable for

For future reference in case of a "wont fix"/"rejected", the workaround
that Mercurial uses on Windows is:

def explain_exit(code):
   return _("exited with status %d") % code, code
Date User Action Args
2009-08-19 08:44:49pjdmsetrecipients: + pjdm
2009-08-19 08:44:49pjdmsetmessageid: <>
2009-08-19 08:44:49pjdmlinkissue1442 messages
2009-08-19 08:44:48pjdmcreate