Is LSB's init script function "start_daemon" really used for real daemons or should I stick to start-stop-daemon?

Posted by Fred on Server Fault See other posts from Server Fault or by Fred
Published on 2011-02-07T22:19:24Z Indexed on 2011/02/07 23:27 UTC
Read the original article Hit count: 225

Filed under:
|

In the context of init scripts, according to the LSB specification, "Each conforming init script shall execute the commands in the file /lib/lsb/init-function", which then defines a couple of functions to be used when using daemons. One of those functions is start_daemon, which obviously "runs the specified program as a daemon" while checking if the daemon is already running.

I'm in the process of daemonizing a service app of mine, and I'm looking at how other daemons are run to try to "fit in". In the process of looking how it's done elsewhere, I noticed that not a single daemon on my Ubuntu 10.04 machine uses start_daemon. They all call start-stop-daemon directly. Same goes for my Fedora 14 machine. Should I try to play nice and be the first one to use start_daemon, or is there really no point and start-stop-daemon is the way to go since everybody is already using that? Why is there no daemons using LSB's functions?

© Server Fault or respective owner

Related posts about init.d

Related posts about lsb