Issue1442

classification
Title: No os.W* attributes
Type: Severity: normal
Components: Library Versions: Jython 2.7
process
Status: open Resolution: remind
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pjdm, zyasoft
Priority: Keywords:

Created on 2009-08-19.08:44:49 by pjdm, last changed 2014-05-21.21:48:30 by zyasoft.

Messages
msg5058 (view) Author: Peter Mayne (pjdm) Date: 2009-08-19.08:44:47
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
msg8485 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.21:48:30
We should see if JNR has support for these codes.
History
Date User Action Args
2014-05-21 21:48:30zyasoftsetnosy: + zyasoft
messages: + msg8485
2013-02-19 21:00:42fwierzbickisetresolution: remind
versions: + Jython 2.7, - 2.5.0
2009-08-21 19:09:52fwierzbickisetnosy: + fwierzbicki
2009-08-19 08:44:49pjdmcreate