mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmdbusd: Add SIGUSR2 to dump flight recorder
This commit is contained in:
parent
05f7fa5a85
commit
b3d8366ff2
@ -77,6 +77,7 @@ def install_signal_handlers():
|
||||
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!")
|
||||
|
||||
|
@ -346,8 +346,12 @@ def dump_threads_stackframe():
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user