pvolok / mprocs

Run multiple commands in parallel
MIT License
1.47k stars 49 forks source link

[ feature request ] Exit if all processes stop #128

Open yonas opened 4 months ago

yonas commented 4 months ago

It would be nice if, by additional CLI flag, mprocs could automatically quit when all process have stopped, so long as all processes exit with status code zero.

An additional flag would enable mprocs to automatically quit even if one or more processes exited with non-zero.

yonas commented 4 months ago

The two flags can be combined into one. For eg.

--exit-after-stop
--exit-after-stop-when=success      Exit when all processes have successfully stopped with exit code zero. This is the default.
--exit-after-stop-when=failure      Exit when all processes have stopped, regardless of exit status.