From owner-freebsd-stable Sun Jun 23 0:48:57 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mail.deltanet.com (mail.deltanet.com [216.237.144.132]) by hub.freebsd.org (Postfix) with ESMTP id 7E2D537B400 for ; Sun, 23 Jun 2002 00:48:48 -0700 (PDT) Received: from mammoth.eat.frenchfries.net (da001d0053.lax-ca.osd.concentric.net [64.0.144.54]) by mail.deltanet.com (8.11.6/8.11.6) with ESMTP id g5N7OcO12826 for ; Sun, 23 Jun 2002 00:24:39 -0700 Received: by mammoth.eat.frenchfries.net (Postfix, from userid 1000) id E340B514C; Sun, 23 Jun 2002 00:47:30 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mammoth.eat.frenchfries.net (Postfix) with ESMTP id E07AE49F8; Sun, 23 Jun 2002 00:47:30 -0700 (PDT) Date: Sun, 23 Jun 2002 00:47:30 -0700 (PDT) From: Paul Herman X-X-Sender: pherman@mammoth.eat.frenchfries.net To: "Geoffrey C. Speicher" Cc: "Matthew D. Fuller" , , Matt Simerson Subject: Re: bug in pw, -STABLE [patch] In-Reply-To: <20020622180011.V80651-100000@sea-incorporated.com> Message-ID: <20020623000216.E37393-100000@mammoth.eat.frenchfries.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 22 Jun 2002, Geoffrey C. Speicher wrote: > DESCRIPTION > pid_begin() will check for existence of the pid file named > _path_, and if it exists, determine whether the process whose > pid is contained therein is still running. > > [...] That's nice and all, but you really are trying to solve the wrong problem here. Remember, you want to lock a particular file and not an entire process. (Think: concurrent pw(8)s with different -V directories.) Keep it simple. Do what you mean. If you want to make changes to /etc/master.passwd then open(2) /etc/master.passwd with O_EXLOCK. -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message