From owner-freebsd-current Sun Mar 5 13:33:39 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA00456 for current-outgoing; Sun, 5 Mar 1995 13:33:39 -0800 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA00443 for ; Sun, 5 Mar 1995 13:33:33 -0800 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id NAA01124; Sun, 5 Mar 1995 13:33:10 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.9/8.6.5) with SMTP id NAA00248; Sun, 5 Mar 1995 13:33:10 -0800 Message-Id: <199503052133.NAA00248@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: Poul-Henning Kamp cc: jhay@mikom.csir.co.za, current@FreeBSD.org Subject: Re: "Text file busy" with program not running anymore? In-reply-to: Your message of "Sun, 05 Mar 95 10:20:56 PST." <199503051820.KAA18600@ref.tfs.com> From: David Greenman Reply-To: davidg@Root.COM Date: Sun, 05 Mar 1995 13:33:08 -0800 Sender: current-owner@FreeBSD.org Precedence: bulk >> It is expected. Whenever a file is executed, the VTEXT flag is set on the >> vnode to indicate that someone is executing it. The flag remains set until >> there are no references to it and it is no longer cached. In your case, it >> lingered in the cache. It never 'times out' - the cached vnodes are replaced >> with other cached vnodes - so it will only get out of the cache if there is >> activity on the system to flush it out. >> It's conceivable that there could be a count instead of a flag...but this >> complicates things quite a bit and I don't see the point in it. Just rm the >> file first. >Wouldn't the right thing be to flush it if it is opened for write ? No. Executed mapped files are a special case. I actually think that the "text file busy" thing is generally a hack that should just be removed. I can see no valid justification for preventing writes to executing files. If you really don't want your executing process(es) to die, then unlinking the file first is this the thing to do. -DG