+ log_reopen_fn = \
+ utils.SetupLogging(constants.DAEMONS_LOGFILES[daemon_name], daemon_name,
+ debug=options.debug,
+ stderr_logging=not options.fork,
+ multithreaded=multithreaded,
+ syslog=options.syslog,
+ console_logging=console_logging)
+
+ # Reopen log file(s) on SIGHUP
+ signal.signal(signal.SIGHUP, compat.partial(_HandleSigHup, log_reopen_fn))
+