Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2012 23:32:17 +0200
From:      Mikolaj Golub <trociny@freebsd.org>
To:        Jos Backus <jos@catnook.com>
Cc:        src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, Guy Helmer <ghelmer@palisadesystems.com>, svn-src-all@freebsd.org, Andrey Zonov <andrey@zonov.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r230869 - head/usr.sbin/daemon
Message-ID:  <86wr7r4u1q.fsf@kopusha.home.net>
In-Reply-To: <CAETOPp0mYn0fVdBdzsDaH16SXzFHa_wLXE3vg--4cgXwVFg9pA@mail.gmail.com> (Jos Backus's message of "Sun, 12 Feb 2012 12:56:58 -0800")
References:  <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> <CAETOPp0mYn0fVdBdzsDaH16SXzFHa_wLXE3vg--4cgXwVFg9pA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 12 Feb 2012 12:56:58 -0800 Jos Backus wrote:

 JB> Right. So why not add a Unix socket listener to daemon(8) so the rc.d
 JB> script can send commands over the socket instead of using the pidfile?
 JB> This is what supervise/svc let you do today.

 JB> I don't understand why this solution isn't obvious once you are
 JB> committed to running daemon(8) for each service anyway. And then you
 JB> don't need pidfiles because now you have a much better, standard
 JB> control interface (sending commands to daemon(8) and gathering
 JB> responses).

Why do you think one is committed to running daemon(8) for each service?
daemon(8) is for a program that can't daemonize itself and you want an easy
way to run it detached from a terminal. And have an easy way to integrate it
in rc(8) using rc.subr(8). And rc.subr(8) knows about pidfiles but knows
nothing about unix sockets.

Although I don't say that the idea to use a socket file for monitoring and
control is bad in general.

-- 
Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wr7r4u1q.fsf>