Closed tpetry closed 6 months ago
Frankly I wouldn't be for adding that kind of feature. It's not a use case multirun was designed for and it would seem cumbersome to use at best.
For such a thing I would more recommend to use some kind of well-designed bash script on top of your application. There are already plenty of examples of how to launch services in the background in a quick&dirty way in bash just to have them running during a user session.
Thanks Nicolas for building multirun, it made building docker containers so much more simple compared to supervisord. While extending the docker images I build to some more I found an interesting use case that I believe still fits multirun:
Take for example you are launching e.g. two processes with multirun.
That works perfectly as expected. Very good work! But if you extend the CLI application to now also ask questions on the stdin from the user this does not work anymore as the stdin is not forwarded.
My idea would be to always forward stdin to the first process in the multirun list of commands to run. For anyone using multirun until now nothing changes. But for the few also wanting to use stdin they can now have one process responsible to handle the stdin. That's also important for application servers that launch an http server and provide a stdin console to control the server.