Date: Sun, 12 Feb 2012 14:37:09 -0800 From: Jos Backus <jos@catnook.com> To: Mikolaj Golub <trociny@freebsd.org> 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: <CAETOPp3CQnXtJtYJk94YSv366QOLOdFB2EZR1qWcFis5icrYcg@mail.gmail.com> In-Reply-To: <86wr7r4u1q.fsf@kopusha.home.net> 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> <86wr7r4u1q.fsf@kopusha.home.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 12, 2012 1:32 PM, "Mikolaj Golub" <trociny@freebsd.org> wrote: > > > 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. I realize that. But ISTR someone mentioned earlier keeping daemon(8) running to keep the pidfile open or something to that effect. > > Although I don't say that the idea to use a socket file for monitoring and > control is bad in general. Right. This approach has a number of benefits. I emailed the daemontools- encore author about including it in FreeBSD but so far he hasn't responded. Jos > > -- > Mikolaj Golub
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAETOPp3CQnXtJtYJk94YSv366QOLOdFB2EZR1qWcFis5icrYcg>