From c0c17a2e2db9a463124a260f300c69e237137b72 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Fri, 11 Jan 2019 00:45:05 +0900 Subject: [PATCH] fix find_victim --- nohang | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nohang b/nohang index 1ce0f49..2577f84 100755 --- a/nohang +++ b/nohang @@ -577,13 +577,21 @@ def find_victim_and_send_signal(signal): oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj') except FileNotFoundError: + print('Process not found') + return None oom_score = 'unknown' oom_score_adj = 'unknown' except ProcessLookupError: + print('Process not found') + return None pass except IndexError: + print('Process not found') + return None cmdline = '' except ValueError: + print('Process not found') + return None pass