fix self-defense with SIGSTOP

This commit is contained in:
Alexey Avramov 2019-02-06 00:53:35 +09:00
parent e264c001b1
commit decfa87753
2 changed files with 3 additions and 1719 deletions

1715
n2

File diff suppressed because it is too large Load Diff

7
nohang
View File

@ -70,11 +70,10 @@ def stop():
continue continue
try: try:
# print(pid) # print(pid)
oom_score_r = pid_to_oom_score(pid) #oom_score_r = int(pid_to_oom_score(pid))
#oom_score_r = rline1('/proc/' + pid + '/oom_score') oom_score_r = int(rline1('/proc/' + pid + '/oom_score'))
#print([oom_score_r]) #print([oom_score_r])
if oom_score_r > 9:
if len(oom_score_r) > 1:
uid_r = pid_to_uid(pid) uid_r = pid_to_uid(pid)
#print('PID: {}, State: {}, oom_score {}'.format(pid, pid_to_state(pid), oom_score_r)) #print('PID: {}, State: {}, oom_score {}'.format(pid, pid_to_state(pid), oom_score_r))
if uid_r != '0': if uid_r != '0':