simpleflow icon indicating copy to clipboard operation
simpleflow copied to clipboard

Add an option to kill child processes

Open benjastudio opened this issue 8 years ago • 3 comments

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.

benjastudio avatar Aug 23 '17 14:08 benjastudio

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.

jbbarth avatar Aug 23 '17 14:08 jbbarth

^ My fault 🙂

ybastide avatar Aug 23 '17 14:08 ybastide

And there is the proof in the backlog :male_detective:

benjastudio avatar Aug 23 '17 14:08 benjastudio