def quiet_kill(pid):
 try:
  os.kill(pid, signal.SIGTERM)
 except OSError:
  pass

def quiet_kill ( pid ) : try : os . kill ( pid , signal . SIGTERM ) except OSError : pass
send a sigterm to pid; wont raise an exception if pid is not running .