add post_kill_exe

This commit is contained in:
Alexey Avramov 2019-02-20 02:18:01 +09:00
parent 0f72535826
commit 0c9d89ac5a

14
nohang
View File

@ -86,6 +86,9 @@ print_proc_table = False
min_mem_report_interval = 5
post_kill_exe = ''
##########################################################################
# define functions
@ -942,6 +945,17 @@ def find_victim_and_send_signal(signal):
key = 'Send {} to {}'.format(
sig_dict[signal], name)
if signal is SIGKILL and post_kill_exe != '':
os.system(
post_kill_exe.replace(
'$PID', pid).replace(
'$NAME', pid_to_name(pid)
)
)
if gui_notifications:
send_notify(signal, name, pid)