This is a simplistic program that runs multiple copies of a single
process, relaying signals received to its children, and managing
cleanup. It was an exercise in learning the "selector" pattern in
It is meant to be used in a
If you need anything more complex, see
foreman or one of its many
clones. This tool is limited to doing only one thing with low resource
You'll need a working Nim build environment.
make release to build it. Put it wherever you please.
- [-d|--debug]: Debug: Emit internal information to stderr.
- [-h|--help]: Help. You're lookin' at it.
- [-n|--number]: Number of children processes to execute.
Defaults to the number of detected processors/cores.
- [-v|--version]: Display version number.
Example: multirun -n=12 program-to-run arguments
- Child processes emitting to stderr/stdout should be unbuffered.
- These signals are "gatewayed" to the child processes:
- Sending two consecutive TERM signals will force shutdown everything.
- The STOP signal is not catchable -- if you want to STOP and RESUME
children, send TSTP instead. It has the same default effect.