From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 13 03:10:18 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 76AD816A4CE for ; Thu, 13 Nov 2003 03:10:18 -0800 (PST) Received: from grummit.biaix.org (86.Red-213-97-212.pooles.rima-tde.net [213.97.212.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 9911B43FAF for ; Thu, 13 Nov 2003 03:10:15 -0800 (PST) (envelope-from joan@grummit.biaix.org) Received: (qmail 51951 invoked by uid 1000); 13 Nov 2003 11:04:34 -0000 Date: Thu, 13 Nov 2003 12:04:34 +0100 From: Joan Picanyol To: freebsd-hackers@freebsd.org Message-ID: <20031113110434.GA51335@grummit.biaix.org> Mail-Followup-To: 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.4.1i Subject: Re: non-root process and PID files X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list 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 11:10:18 -0000 * Terry Lambert [20031113 11:46]: > Jos Backus wrote: > > On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: > > > 1 - write your PID immediately, and the file is chown root:wheel > > > 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/ > > > is chown myapp:myapp > > > > > > Of the two, I think #1 is cleaner as it does not require another > > > directory with special permissions. > > > > > > Any suggestions? > > > > Why use pid files at all if you could be using a process supervisor instead? > > Who supervises the supervisor? Sure, you can take the English > Bobby approach (init dies, the kernel yells "Help me, human, or > I shall yell 'Help me Human!' again", and tries to start software > that will never start over and over), but that solves nothing; Let the supervisor be process 1: http://multivac.cwru.edu/svscan-1/ http://smarden.org/runit/ http://www.fefe.de/minit/ qvb -- pica