From owner-freebsd-current Mon Mar 6 10:35:56 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA13952 for current-outgoing; Mon, 6 Mar 1995 10:35:56 -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 KAA13940 for ; Mon, 6 Mar 1995 10:35:47 -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 KAA03360; Mon, 6 Mar 1995 10:35:14 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.9/8.6.5) with SMTP id KAA02220; Mon, 6 Mar 1995 10:35:13 -0800 Message-Id: <199503061835.KAA02220@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: terry@cs.weber.edu (Terry Lambert) cc: current@FreeBSD.org Subject: Re: "Text file busy" with program not running anymore? In-reply-to: Your message of "Mon, 06 Mar 95 10:36:07 MST." <9503061736.AA18439@cs.weber.edu> From: David Greenman Reply-To: davidg@Root.COM Date: Mon, 06 Mar 1995 10:35:12 -0800 Sender: current-owner@FreeBSD.org Precedence: bulk >> >Now it isn't the end of the world for me, I can just delete the file before >> >I copy the new one or use install. >> > >> >I would just like to know if this is expected behaviour or not? >> >> 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. > >Or type sync. It *does* still do what its man page says it does, right? The man page says it insures that all disk writes have completed (for the command) and that modified buffers are written out (for the system call). Yes, it does indeed still do this (and in fact, has been extended to write out all modified pages in the system as well). Since the problem mentioned above has nothing to do with writes completing or modified buffers being synced, I fail to see how your comment is relevant. Once again, the problem is that the pager of a cached object retains a reference to the vnode while it exists and the VTEXT flag isn't cleared when the object is put into the object cache. This shouldn't be a difficult problem to solve. (Although a quick hack I just added to do this very thing isn't working as expected - which suggests that there may be a (reference count) problem with objects going into the cache correctly.) -DG