def sighandler(sig, stack):
 syslog.syslog(syslog.LOG_WARNING, ('Exiting on signal = %d..' % (sig,)))
 sys.exit((128 + signal.SIGTERM))

def sighandler ( sig , stack ) : syslog . syslog ( syslog . LOG_WARNING , ( 'Exiting on signal = %d..' % ( sig , ) ) ) sys . exit ( ( 128 + signal . SIGTERM ) )
a signal handler for the daemon .