So Ruby's daemons gem lets you set monitor=true
when you start up your process. What the heck is a monitor and what do you do with it? All you do is specify true
or false
...is that creating a log file somewhere? Something that is actually monitoring the process, like god
? Why is the documentation on what this thing is so horrible?
Or is this actually a Unix thing that everyone is supposed to know about? :)
From the fine manual:
Looks like it sets up a PID file (i.e. a file holding the daemon's process ID) to track the daemon; if the daemon crashes for some reason, the monitor will restart it.
You'll have to ask the authors why their documentation is so sparse; the source code looks clear enough to the gist of what's going on though. I'd think that anyone that has built a daemon or two would be familiar with the concept of monitoring and restarting them.