http://www.perlmonks.org?node_id=1061698


in reply to Re^2: A few questions regarding Proc::Daemon
in thread A few questions regarding Proc::Daemon

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.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)