Run N copies of a binary. Restart on exit. Kill all on shutdown.
go build -o spawn-manager
Cross-compile for arm64:
GOOS=linux GOARCH=arm64 go build -o spawn-manager
./spawn-manager -n 10 -- ./your-binary arg1 arg2
-n N number of workers (default 1)
-grace D grace period before SIGKILL (default 5s)
-backoff D delay before respawning an exited worker (default 500ms)