together
can run multiple processes, together, such as that they live and die together. It is useful in the case you have a a supervising process that watches a single PID. This can be specifically interesting for container runtimes that expect a single process to run.
It is in a way an 'anti-supervisor' it doesn't restart processes but rather makes sure that all processes die together.
together "long running process 1" "long running process 2" "another long running process"
For example:
together "sleep 5" "sleep 10"
Will spawn two processes, when the first one exits after 5 seconds its sibling will be killed too.
- If any of the processes die, together will kill the others
- If it receives a SIGTERM or a SIGINT it will kill the spawned processes
together
is written in go, so you will need that installed, afterwards:
make
For the moment, grab the executable built with the github action :
wget https://github.com/OriPekelman/go-together/releases/download/v0.0.0/together
chmod +x together
and put it somewher reasonable.
- Ori Pekelman - Initial work - Ori Pekelman
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details