def StartDaemon(self):
    current_pid = self._get_current_pid()
    if current_pid is not None:
      raise DaemonError('Daemon process is already started with PID:%s' % current_pid)

    self._context = daemon.daemon.DaemonContext(pidfile=self.lockfile)
    try:
      self._context.open()
    except pidlockfile.AlreadyLocked:
      pid = self.lockfile.read_pid()
      raise DaemonError('Daemon process is already started with PID:%s' % pid)
Converts the current process to a daemon unless another daemon process
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/daemon.py/DaemonManager.StartDaemon