fix self-defense with SIGSTOP
This commit is contained in:
parent
e264c001b1
commit
decfa87753
7
nohang
7
nohang
@ -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':
|
||||||
|
Loading…
Reference in New Issue
Block a user