def daemonized(verbosity, logPath):
process = get_i3configger_process()
if process:
sys.exit(f"i3configger already running ({process})")
context = daemon.DaemonContext(working_directory=Path(__file__).parent)
if verbosity > 2:
# spew output to terminal from where daemon was started
context.stdout = sys.stdout
context.stderr = sys.stderr
with context:
base.configure_logging(verbosity, logPath, isDaemon=True)
watch_guarded()
评论列表
文章目录