Python: Submitting and tracking many subprocesses leads to “stuck” subprocesses
I have an 3rd party cli executable I need to call from my python code. These are heavy calculations (cpu) and there are around 50-100 times I need to call it. The executable itself is to some degree multi-threaded but not all steps and I have a lot of cores available.
Can a Python program find orphan processes that it previously created?
I’m using popen()
to create potentially long-running processes in Python. If the parent program dies and then restarts, is there a way to retrieve the previously created processes that are still running? I’d probably have to use start_new_session=True
, which I’m not doing now.
Can a Python program find orphan process that it previously created?
I’m using popen() to create potentially long-running processes in Python. If the parent program dies and then restarts, is there a way to retrieve the previously created processes that are still running? I’d probably have to use start_new_session=True, which I’m not doing now.
Essentially, I want to get a re-constructed instance of a popen object that points to the child process. I suspect it’s not possible, since serializing a popen() object doesn’t seem to be possible.