From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 13 08:56:27 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B95216A4CE for ; Thu, 13 Nov 2003 08:56:27 -0800 (PST) Received: from mail2.dslextreme.com (mail2.dslextreme.com [66.51.199.52]) by mx1.FreeBSD.org (Postfix) with SMTP id 3D73343FDF for ; Thu, 13 Nov 2003 08:56:26 -0800 (PST) (envelope-from jos@catnook.com) Received: (qmail 8645 invoked from network); 13 Nov 2003 16:56:25 -0000 Received: from unknown (HELO w250.z064001178.sjc-ca.dsl.cnc.net) (66.218.45.239) by 192.168.8.48 with SMTP; Thu, 13 Nov 2003 16:56:25 +0000 Received: (qmail 81268 invoked by uid 1000); 13 Nov 2003 16:56:47 -0000 Date: Thu, 13 Nov 2003 08:56:25 -0800 From: Jos Backus To: Terry Lambert Message-ID: <20031113165647.GA80504@lizzy.catnook.com> Mail-Followup-To: Terry Lambert , freebsd-hackers@freebsd.org References: <3F9CF3F6.8307.ABC1250@localhost> <20031111071944.GA5778@lizzy.catnook.com> <3FB360BE.779DB42F@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FB360BE.779DB42F@mindspring.com> User-Agent: Mutt/1.5.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: non-root process and PID files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jos@catnook.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 16:56:27 -0000 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'