systems like Debian's startup scripts which is much more complex and it is
not portable even among Linux distributions.
It is now more polished, since I'm building some services with it. It is
also into a new import path.
The operation is very simple. There is a function, Wait [1], that catches
the interruptions and sets a exit status code according to that
interruption; the function ExitStatus exits with such exit code. Finally,
the command "starter" --which has to run the service-- gets the exit code
to proceed according to it.
[1]: https://github.com/kless/starter/blob/master/starter.go
All magic happens in the command:
https://github.com/kless/starter/blob/master/cmd/starter/cmd_starter.go
Note: In Unix systems, the command has to be run like root because it uses
the directory "/var/run" to store the file with the PID.
Project: https://github.com/kless/starter
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.