daemon.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:smarthome 作者: smarthomeNG 项目源码 文件源码
def check_sh_is_running(pidfile):
    """
    This method deamonizes the sh.py process and redirects standard file descriptors.

    :param pidfile: Name of the pidfile to check
    :type pidfile: str

    :return: True: if SmartHomeNG is running, False: if SmartHome is not running
    :rtype: bool
    """

    pid = read_pidfile(pidfile)
    return psutil.pid_exists(pid) if pid > 0 else False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号