fixed ramlimit2

This commit is contained in:
themixray 2022-01-07 16:02:33 +03:00
parent a999e4b233
commit fe455d2938

View file

@ -179,8 +179,9 @@ def create(title=None, size=(0,0), icon=None, resizable=False, noframe=False):
def ramLimit(memory_limit): def ramLimit(memory_limit):
if not nonwin32api: if not nonwin32api:
job_name = ''
breakaway = 'silent' breakaway = 'silent'
hjob = _w32j.CreateJobObject(None,'') hjob = _w32j.CreateJobObject(None,job_name)
if breakaway: if breakaway:
info = _w32j.QueryInformationJobObject(hjob,_w32j.JobObjectExtendedLimitInformation) info = _w32j.QueryInformationJobObject(hjob,_w32j.JobObjectExtendedLimitInformation)
if breakaway=='silent':info['BasicLimitInformation']['LimitFlags']|=(_w32j.JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK) if breakaway=='silent':info['BasicLimitInformation']['LimitFlags']|=(_w32j.JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)