From owner-freebsd-current@FreeBSD.ORG Tue May 22 20:06:02 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D96A416A46B; Tue, 22 May 2007 20:06:02 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 9937F13C458; Tue, 22 May 2007 20:06:02 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id F070B2084; Tue, 22 May 2007 22:05:57 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E2D442083; Tue, 22 May 2007 22:05:57 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id BD99757C8; Tue, 22 May 2007 22:05:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Joe Marcus Clarke References: <46534301.10005@FreeBSD.org> Date: Tue, 22 May 2007 22:05:57 +0200 In-Reply-To: <46534301.10005@FreeBSD.org> (Joe Marcus Clarke's message of "Tue\, 22 May 2007 15\:22\:41 -0400") Message-ID: <864pm4zkre.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: pjd@FreeBSD.org, "current@freebsd.org" Subject: Re: [Fwd: Serious problem with mount(8)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 20:06:02 -0000 Joe Marcus Clarke writes: > I really don't know why I didn't notice this before, but when mount was > converted to use the pidfile(3) API three months ago, the behavior of > mount(8) changed with regard to restarting mountd. A pidfile client > cannot use pidfile_open(3) as this will truncate the pidfile. The > result is that mount reads in a PID of 0, and when it tries to send a > SIGHUP to this PID, it kills itself. Consequently, this is breaking the > ports Tinderbox. > > I suppose we could revert to the previous behavior, but use flopen() to > test if the file is actually locked. Maybe something like this: > > http://www.marcuscom.com/downloads/mount.c.diff Better yet, extend the pidfile API with a function which reads the contents of a PID file and also checks whether it's locked. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no