From owner-freebsd-hackers Mon May 27 14:36: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id EB15B37B407; Mon, 27 May 2002 14:35:47 -0700 (PDT) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id BAA20122; Tue, 28 May 2002 01:36:00 +0400 (MSD) Message-Id: <200205272136.BAA20122@aaz.links.ru> Subject: Re: non-root /var/run files (was Re: Sendmail, smmsp, and pid file) In-Reply-To: <20020527184744.GD1724@lizzy.catnook.com> from "Jos Backus" at "May 27, 2 11:47:22 am" To: jos@catnook.com Date: Tue, 28 May 2002 01:36:00 +0400 (MSD) Cc: stable@FreeBSD.ORG, hackers@FreeBSD.ORG From: "."@babolo.ru MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jos Backus writes: > As this thread once more suggests, the whole concept of pidfiles is broken. > The proper way is to use a service control manager which keeps track of > processes, allowing them to be stopped/restarted etc. through a single API. (I I understand, but there no control manager now, and I suggest some tuning of rights --- etc/mtree/BSD.var.dist Mon Jan 14 14:23:15 2002 +++ etc/mtree/BSD.var.dist Sat Mar 9 20:32:38 2002 @@ -53,7 +53,7 @@ .. preserve .. - run + run gname=daemon mode=1775 ppp gname=network mode=0770 .. .. and every daemon in group 'daemon' while no better method > am not going to mention AIX's System Resource Controller again because some > people on this list don't seem to like AIX.) > > Last time the discussion about daemontools seemed to end in it being a good > idea but djb's license being unsuitable, iIrc. So on the 22nd I sent an > e-mail to -hackers saying that I have found a BSD-licensed service control > manager suitable for import into the base OS, in the hope of restarting this > discussion. init(8) doesn't cut it for various reasons: single config file, > runs as root, critical to system startup, etc. I have a lot of troubles with djb's tools in jail environment: they are unreliable. Are you sure that http://www.io.com/~manoj/file/mktool-0.0.7.tar.gz (are you mean this one?) is better? I do not find docs or mans and am not sure that it is worth-while to dig in thist code instead of simple shell scripts (as in ports/38593 - that is my way to service control manager) > But it appears I am in a minority because so far I have only received one > private response. > > Mnsho, of course. > > Jos > > On Mon, May 27, 2002 at 12:24:56PM -0600, Lyndon Nerenberg wrote: > > [Redirecting to the hackers list -- please respect the reply-to header] > > > > >>>>> "Claus" == Claus Assmann writes: > > > > Claus> On Mon, May 27, 2002, Philip J. Koenig wrote: > > >> Any particular reason why the sendmail with 4.6-RC is writing sm- > > >> client.pid into /var/spool/clientmqueue instead of /var/run? > > > > Claus> Permissions. > > > > This points out a short-fall in the /var/run scheme: it can only be used > > by processes running with an euid of 0 at the time they create the file. > > > > If we have a /var/run/sendmail directory owned by the smmsp user then > > sendmail can create its pid files there. Likewise for bind. The purgedir > > function in /etc/rc (used to clean /var/run) will preserve the existing > > directory structure under /var/run, so the sub-directory tree will > > survive reboots. > > -- > Jos Backus _/ _/_/_/ Santa Clara, CA > _/ _/ _/ > _/ _/_/_/ > _/ _/ _/ _/ > jos@catnook.com _/_/ _/_/_/ use Std::Disclaimer; > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message