Open mitar opened 2 years ago
If you need more sophisticated job management I would recommend using a shell script that launches the executable and watches for the actual program. A very simple one would be something like
#!/bin/bash
while true; do
./my_go_executable "$@"
sleep 5 # avoid flooding the system with crashing applications
done
I don't think this is a job for CompileDaemon
:)
I have a commit on a fork that does this: https://github.com/asalkeld/CompileDaemon/commit/238f1e64517ec5442a6b0e9ea2b3479978b7b74b If you are interested, I'll happily make a PR.
Sometimes a running program fails because of the panic. Because CompileDaemon keeps running it is hard to notice that (except for the panic stack trace). I think it would be best if CompileDaemon would just restart the program, with some message (like, "program terminated, restarting"). Probably as opt-in CLI flag.