def daemonize(logfile, pidfile):
needl.log.info('Daemonizing and logging to %s', logfile)
with daemon.DaemonContext(working_directory=os.getcwd(),
stderr=logfile,
umask=0o002,
pidfile=daemon.pidfile.PIDLockFile(pidfile)) as dc:
start()
评论列表
文章目录