From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 27 09:15:03 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 4DE2816A4B3 for ; Mon, 27 Oct 2003 09:15:03 -0800 (PST) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id B303243F85 for ; Mon, 27 Oct 2003 09:15:00 -0800 (PST) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h9RHF08i039127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Oct 2003 12:15:00 -0500 (EST) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h9RHF0xY039126 for freebsd-hackers@freebsd.org; Mon, 27 Oct 2003 12:15:00 -0500 (EST) Date: Mon, 27 Oct 2003 12:15:00 -0500 From: Leo Bicknell To: freebsd-hackers@freebsd.org Message-ID: <20031027171500.GF35805@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <3F9CF3F6.8307.ABC1250@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9ADF8FXzFeE7X4jE" Content-Disposition: inline In-Reply-To: <3F9CF3F6.8307.ABC1250@localhost> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ 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: Mon, 27 Oct 2003 17:15:03 -0000 --9ADF8FXzFeE7X4jE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille= wrote: > Any suggestions? Here's a slightly backwards concept. We're all familar with how you can open a file, remove it from the directory, and not have it "go away" until the application closes it. Well, extend those semantics to the namespace. That is, have a directory where any name that does not exist can be opened RW, any name that does exist can be opened RO. A file is automatically removed when no one has an open descriptor to it anymore. So, the "server app" does: open(pidfile) write(pid, pidfile) flush(pidfile) [go do all the server stuff, and then at shutdown] close(pidfile) All other apps just read it, but can't overwrite it because it's RO. I'm not sure how useful this sort of file system change would be in practice, but it would solve the problem, no? --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --9ADF8FXzFeE7X4jE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/nVKUNh6mMG5yMTYRAqn1AJ0XWbUmf1K1bKTHxbYqe5ONd/zE1QCfT2jy cwojcT3QB2Es0OzEaUK2tOw= =a6WR -----END PGP SIGNATURE----- --9ADF8FXzFeE7X4jE--