daemon.py 文件源码

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

项目:vaping 作者: 20c 项目源码 文件源码
def _exec(self, detach=True):
        """
        daemonize and exec main()
        """
        kwargs = {
            'pidfile': self.pidfile,
            'working_directory': self.home_dir,
            }

        # FIXME - doesn't work
        if not detach:
            kwargs.update({
                'detach_process': False,
                'files_preserve': [0,1,2],
                'stdout': sys.stdout,
                'stderr': sys.stderr,
                })

        ctx = daemon.DaemonContext(**kwargs)

        with ctx:
            self._main()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号