docs: def statusfmt(status):
      """
      Format an exit status as text.
  """
      if status == 0:
          msg = 'exited ok'
      elif os.WIFSIGNALED(status):
          msg = 'died on '+signame(os.WTERMSIG(status))
      elif os.WIFEXITED(status) and os.WEXITSTATUS(status) > 0:
          msg = 'exited '+str(os.WEXITSTATUS(status))
      else:
          msg = 'unknown exit code 0x%04x' % (status,)
      if os.WCOREDUMP(status):
          msg += ' (core dumped)'
      return msg