def is_deamon_running(self, return_pid=False): """check if pid file exists""" pid = self.__get_pid() """check a process with the pid is running""" from cv.base import check_pid if return_pid: if pid: return check_pid(int(pid)), pid else: return False, -1 else: if pid: return check_pid(int(pid)) else: return False
def __get_pid_of_running_deamon(self): pid = self.__get_pid() from cv.base import check_pid if pid and not check_pid(pid): pid = None return pid