From owner-freebsd-hackers Wed May 22 19:19:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from sea-incorporated.com (caribbean.sea-incorporated.com [209.74.10.130]) by hub.freebsd.org (Postfix) with ESMTP id E2EB537B408 for ; Wed, 22 May 2002 19:19:43 -0700 (PDT) Received: from localhost (geoff@localhost) by sea-incorporated.com (8.9.3/8.9.3) with ESMTP id WAA84480; Wed, 22 May 2002 22:19:33 -0400 (EDT) (envelope-from geoff@sea-incorporated.com) Date: Wed, 22 May 2002 22:19:33 -0400 (EDT) From: "Geoffrey C. Speicher" To: Paul Herman Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: bug in pw, -STABLE [patch] In-Reply-To: <20020518110125.Q410-100000@mammoth.eat.frenchfries.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 18 May 2002, Paul Herman wrote: > Well, unlink and remove are the same in my vocabulary. The file is > removed when you unlink it, but the will lock remain until you > close it. Well, unlink and remove are apparently not the same in the man page for unlink(2), as excepted here: If one or more process have the file open when the last link is removed, the link is removed, but the removal of the file is delayed until all references to it have been closed. But as you mentioned in your private email, using the lock at all is probably overkill, and it would probably suffice to just test for file existence and put a delayed loop around open(). Unfortunately I've been terribly busy and I haven't had a chance to test that out yet. Geoff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message