Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Nov 2003 08:56:25 -0800
From:      Jos Backus <jos@catnook.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: non-root process and PID files
Message-ID:  <20031113165647.GA80504@lizzy.catnook.com>
In-Reply-To: <3FB360BE.779DB42F@mindspring.com>
References:  <3F9CF3F6.8307.ABC1250@localhost> <20031111071944.GA5778@lizzy.catnook.com> <3FB360BE.779DB42F@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 13, 2003 at 02:45:18AM -0800, Terry Lambert wrote:
> > Why use pid files at all if you could be using a process supervisor instead?
> 
> Who supervises the supervisor?

Heh. The supervisor should be small and robust, like init. Has init died on
you recently? Do you want to solve this problem or find Nirvana? If the
latter, don't use computers.

> So this doesn't solve the origin of authority problem.
 
> The problem being solved is avoiding running multiple instances
> of roles... so actually, it would be better if the file were
> named e.g. "smtp.pid", rather than "sendmail.pid", which would
> step on the toes of everyone who wanted to use their program name
> as part of the file name to make it harder to use someone else's
> software to replace their software.

Agreed, but that's a different problem, and using pidfiles is just one way of
implementing this. My suggestion is to use /service/smtpd, avoiding the use of
pidfiles and their associated problems.

> There are also the small issues of ordering (the reason you can't
> just run everything out of /etc/ttys via init in the first place),

Sure. Hard to get right but not unsolvable. No reason you can't use process
monitoring with something like rcNG.

> multiple instances,

/service/smtpd.{external,internal}

> and removing human error from adding and removing new things to be
> monitored.
 
That's a generic problem with any type of change management.

> -- Terry

-- 
Jos Backus                       _/  _/_/_/      Sunnyvale, CA
                                _/  _/   _/
                               _/  _/_/_/
                          _/  _/  _/    _/
jos at catnook.com        _/_/   _/_/_/          require 'std/disclaimer'



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