fix find_victim

This commit is contained in:
Alexey Avramov 2019-01-11 00:45:05 +09:00
parent 8d5730f6b1
commit c0c17a2e2d

8
nohang
View File

@ -577,13 +577,21 @@ def find_victim_and_send_signal(signal):
oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj') oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj')
except FileNotFoundError: except FileNotFoundError:
print('Process not found')
return None
oom_score = 'unknown' oom_score = 'unknown'
oom_score_adj = 'unknown' oom_score_adj = 'unknown'
except ProcessLookupError: except ProcessLookupError:
print('Process not found')
return None
pass pass
except IndexError: except IndexError:
print('Process not found')
return None
cmdline = '' cmdline = ''
except ValueError: except ValueError:
print('Process not found')
return None
pass pass