equal
deleted
inserted
replaced
477 os.kill(pid, 0) |
477 os.kill(pid, 0) |
478 return True |
478 return True |
479 except OSError as inst: |
479 except OSError as inst: |
480 return inst.errno != errno.ESRCH |
480 return inst.errno != errno.ESRCH |
481 |
481 |
482 def explainexit(code): |
|
483 """return a 2-tuple (desc, code) describing a subprocess status |
|
484 (codes from kill are negative - not os.system/wait encoding)""" |
|
485 if code >= 0: |
|
486 return _("exited with status %d") % code, code |
|
487 return _("killed by signal %d") % -code, -code |
|
488 |
|
489 def isowner(st): |
482 def isowner(st): |
490 """Return True if the stat object st is from the current user.""" |
483 """Return True if the stat object st is from the current user.""" |
491 return st.st_uid == os.getuid() |
484 return st.st_uid == os.getuid() |
492 |
485 |
493 def findexe(command): |
486 def findexe(command): |