7 ms·
There are job objects which are similar to Linux cgroups, including the ability to set a limit on the number of processes. But I'm not sure if that limit will b
by Arnavion 11mo ago
There are job objects which are similar to Linux cgroups, including the ability to set a limit on the number of processes. But I'm not sure if that limit will be tripped in this case or not because the child processes have exited, whereas the job object parameter is specifically called LIMIT_ACTIVE_PROCESS
https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects https://learn.microsoft.com/en-us/windows/win32/procthread/j...
https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_limit_information https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns...
- diath 11mo agoOpenProcess retrieves a handle to an existing process rather than creating a process so it won't be governed by JOB_OBJECT_LIMIT_ACTIVE_PROCESS, the bug here is that it's leaking handles, not processes.
- Arnavion 11mo agoAh yes, in that case the relevant limit would be one on total handles, which doesn't seem to exist.