[arch-dev-public] [arch-general] Adopting start-stop-daemon in archlinux

Thomas Bächler thomas at archlinux.org
Thu Sep 8 07:08:20 EDT 2011

Am 08.09.2011 12:08, schrieb Clemens Fruhwirth:
> If you use Debian, you might have come across start-stop-daemon. It's
> part of the dpkg package and encapsulates all the knowledge, they
> learnt when dealing with starting and stopping daemons. It has plenty
> of features ranging from:
> * handling pidfiles more intimately (checking the pid files content,
> verifying that the pid given actually is the executable in question)
> * changing UID/GID
> * chrooting, nice-ing
> * retry starting if daemon dies
> * creating pid files when the process doesn't do it, etc, etc.
> curl http://clemens.endorphin.org/start-stop-daemon.c | less
> if you want to have look for yourself. It's a single C file.
> To me handling pid files correctly is the biggest win. The paradigm
> used commonly in arch
> PID=`pidof -o %PPID /usr/bin/executable`
> [ -z "$PID" ] &&  /usr/bin/executable
> is flawed and does not work reliably as shown here
> https://bugs.archlinux.org/task/17138
> I propose to switch to start-stop-daemon and deprecate the method above.
> http://clemens.endorphin.org/sshd-start-stop-daemon.diff is an example
> of an rc.d script ported to start-stop-daemon. The paradigm -- to my
> personal taste -- is clean and simple. The diffstat is negative
> LOC-wise.
> We could either take the aur/start-stop-daemon packaging which
> references dpkg.tar.gz or include into another core package.
> start-stop-daemon.c is public domain.
> --
> Fruhwirth Clemens http://clemens.endorphin.org

Forwarding to the dev list, in case someone doesn't notice it here. In
principle, I think this is a good idea. I want to hear Tom's opinion
though, as this is closely initscripts-related.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-dev-public/attachments/20110908/18148e52/attachment.asc>

More information about the arch-dev-public mailing list