simpleflow
simpleflow copied to clipboard
Add an option to kill child processes
It would be useful to add an option to force simpleflow to kill child processes in simpleflow.execute, on exit, eg:
python -m simpleflow.execute x.launch_process '{"args": []}' --kill-children
Somewhere in x.py:
import subprocess, time
def launch_process():
subprocess.Popen(['sleep', '600'])
time.sleep(2)
With --kill-children simpleflow should kill sleep process after that launch_process is executed.
Note for future problems that you already solved: no need to make an issue just to issue the PR 3 minutes after, you can issue the PR directly in such cases, with the explanation in the PR description. As you want, it's OK like that too, I just don't do it myself and don't want you to feel forced to do that.
^ My fault 🙂
And there is the proof in the backlog :male_detective: