docs: def pid_exists(pid):
      """Check whether pid exists in the current process table."""
      if pid < 0:
          return False
      try:
          os.kill(pid, 0)
      except OSError as e:
          return e.errno == errno.EPERM
      else:
          return True