Message5058

Author pjdm
Recipients pjdm
Date 2009-08-19.08:44:47
SpamBayes Score 1.1661444e-05
Marked as misclassified No
Message-id <1250671489.16.0.817541889041.issue1442@psf.upfronthosting.co.za>
In-reply-to
Content
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
Jython.

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
History
Date User Action Args
2009-08-19 08:44:49pjdmsetrecipients: + pjdm
2009-08-19 08:44:49pjdmsetmessageid: <1250671489.16.0.817541889041.issue1442@psf.upfronthosting.co.za>
2009-08-19 08:44:49pjdmlinkissue1442 messages
2009-08-19 08:44:48pjdmcreate