From owner-cvs-src@FreeBSD.ORG Fri Aug 26 10:36:21 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7CFB16A41F; Fri, 26 Aug 2005 10:36:21 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3BD143D48; Fri, 26 Aug 2005 10:36:17 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 60F7552C93; Fri, 26 Aug 2005 12:36:14 +0200 (CEST) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 6277852BC1; Fri, 26 Aug 2005 12:36:00 +0200 (CEST) Date: Fri, 26 Aug 2005 12:35:30 +0200 From: Pawel Jakub Dawidek To: Doug Barton Message-ID: <20050826103530.GC43700@garage.freebsd.pl> References: <200508241721.j7OHLcNP061118@repoman.freebsd.org> <20050825060448.Q11335@fledge.watson.org> <20050825154354.GE30465@funkthat.com> <20050825171046.X72462@fledge.watson.org> <430EE78A.8060306@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bAmEntskrkuBymla" Content-Disposition: inline In-Reply-To: <430EE78A.8060306@FreeBSD.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: cvs-src@FreeBSD.org, John-Mark Gurney , src-committers@FreeBSD.org, Robert Watson , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil Makefile libutil.h pidfile.3 pidfile.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2005 10:36:21 -0000 --bAmEntskrkuBymla Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 26, 2005 at 02:57:30AM -0700, Doug Barton wrote: +> All that said, and not to throw cold water on Pawel's work here, but I= =20 +> really am not sure that encouraging the use of pid files in this day and= age=20 +> is a good idea. IMO it's a bit of an artifact from a different era, and = I=20 +> would love to see us eliminate the use of pid files altogether. But that= 's=20 +> just me. Pidfiles are quite ok when you do it right. Without them it is hard to use automats for sending signals to daemons and be sure you don't hit some random process. Of course I'll be glad to hear other solutions. +> I have a specific concern with the way that I understand the library to = work, has the use of FLOCK been tested on NFS mounted /var, and diskless bo= ot scenarios? Basically daemons on NFS mounted /var/ (without rpc.lockd) are going to work still, ie. I advice in manual page (in example) to ignore errors =66rom pidfile_open() other than EEXIST and this is what I did for most of our daemons. EEXIST means that daemon is already running, other errors mean that we cannot create/lock/etc. pidfile for other reasons. The exception here is cron(8), which used flock(2) before for pidfiles and exits when it cannot lock pidfile, which means cron will not work in such environment. I don't know the reason of such behaviour so I leaved it as it was - any error from pidfile_open() is critical for cron(8). We could still add storing PID even if flock(2) fails, which is not done now. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --bAmEntskrkuBymla Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDDvByForvXbEpPzQRAn/pAKDCKU4d4AnJ5Cu/GY5g3nVBoVcmAwCdEqWN X8YpT4MNfj7LmMJx8ky5znk= =doFB -----END PGP SIGNATURE----- --bAmEntskrkuBymla--