parameters: (pid)
docstring: os.kill annoyingly raises exception if process already dead.  Ignore it.
docstring_summary: os.kill annoyingly raises exception if process already dead.  Ignore it.
docstring_tokens: os . kill annoyingly raises exception if process already dead . Ignore it .
function: def safe_kill(pid):
      """
      os.kill annoyingly raises exception if process already dead.  Ignore it.
      """
      try:
          return os.kill(pid, signal.SIGKILL)
      except OSError as e:
          if e.errno == errno.ESRCH:
              # Raced with process termination
              pass
          else:
              raise
function_tokens: def safe_kill ( pid ) : try : return os . kill ( pid , signal . SIGKILL ) except OSError as e : if e . errno == errno . ESRCH : # Raced with process termination pass else : raise