|No such thing as a small change|
Re^3: A few questions regarding Proc::Daemonby afoken (Monsignor)
|on Nov 08, 2013 at 10:33 UTC||Need Help??|
I'm trying to write a daemon, not trying to replace systemd, initd, upstart, etc.
Yes, I know.
Your suggestion seems way overkill as an answer to my question.
No. You did not understand my answer. Your daemon is doing too much work. Let the operating system (i.e. daemontools, systemd, init, upstart, ...) handle forking, logging, restarting. Write your daemon so that it does not fork to "background", does not re-invent logging, does not re-invent sending signals to a running process, does not re-invent configuration, etc. Have a look at the daemontools and services sections of the djb way.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)