From cf19909d5d67d944548b6480511925d80f639cd6 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Wed, 13 Feb 2019 02:29:38 +0900 Subject: [PATCH] fix victim state displaying --- nohang | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nohang b/nohang index ccfd00b..89c33ab 100755 --- a/nohang +++ b/nohang @@ -650,7 +650,8 @@ def find_victim_and_send_signal(signal): with open('/proc/' + pid + '/status') as f: for n, line in enumerate(f): - + if n is state_index: + state = line.split('\t')[1].rstrip() if n is ppid_index: ppid = line.split('\t')[1] @@ -773,7 +774,7 @@ def find_victim_and_send_signal(signal): print('Victim died: /proc/{}/exe does not exists'.format(pid)) - state = pid_to_state(pid) + #state = pid_to_state(pid) pname = pid_to_name(ppid.strip('\n ')) # print([ppid], [pname])