on-internet
← Community

Python limit maximum allowed subprocesses opened

Stack Overflow ·

Earlier I had a question about killing children subprocesses in Python 3. The thread is here > Python close children subprocess and the working code is as follows: def open_storage(): global my_process my_process = subprocess.Popen("waffles.exe") def kill_children(): my_process.kill() Now I have another question. How do I limit the maxiumum number of allowed subprocesses spawned? I know with Linux you can simply use ulimit, as described in a thread found here > Python: ulimit and nice for subprocess.call / subprocess.Popen? Where the linux method is: import subprocess subprocess.Popen('ulimit

Comments

Sign in or sign up to comment and upvote.

No comments yet.