signal_add(GLib.PRIORITY_HIGH, signal.SIGHUP, utils.handler, signal.SIGHUP)
signal_add(GLib.PRIORITY_HIGH, signal.SIGINT, utils.handler, signal.SIGINT)
signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR1, utils.handler, signal.SIGUSR1)
+ signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR2, utils.handler, signal.SIGUSR2)
else:
log_error("GLib.unix_signal_[add|add_full] are NOT available!")
# noinspection PyUnusedLocal
def handler(signum):
try:
+ # signal 10
if signum == signal.SIGUSR1:
dump_threads_stackframe()
+ # signal 12
+ elif signum == signal.SIGUSR2:
+ cfg.blackbox.dump()
else:
cfg.run.value = 0
log_debug('Exiting daemon with signal %d' % signum)