svn commit: r230869 - head/usr.sbin/daemon

Jos Backus jos at catnook.com
Sun Feb 12 22:37:11 UTC 2012


On Feb 12, 2012 1:32 PM, "Mikolaj Golub" <trociny at 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


More information about the svn-src-head mailing list