def StopDaemon(self, require_running=True):
    """Stops any currently running daemon process on the system."""
    current_pid = self._get_current_pid()
    if require_running and current_pid is None:
      raise DaemonError('Daemon process was not running.')

    try:
      os.kill(current_pid, signal.SIGTERM)
    except __HOLE__, exc:
      raise DaemonError('Failed to stop daemon process %d: %s' % (current_pid, exc))
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/daemon.py/DaemonManager.StopDaemon