4 ms·
You know how you can write a daemon that starts a service, and then restarts the service if it crashes. Usually you'd use a service like that in your operating
by PopeDotNinja 8y ago
You know how you can write a daemon that starts a service, and then restarts the service if it crashes. Usually you'd use a service like that in your operating system init process: System V, Launchd, Systemd, Runit, etc. Now imagine the ability to do that in a program. You can write an elixir process, start it with a supervisor, and if the process crashes, the supervisor automatically traps the exit signal & and starts a new process. No messing around with operating system init shenanigans required!