Date: Mon, 06 Mar 1995 10:35:12 -0800 From: David Greenman <davidg@Root.COM> To: terry@cs.weber.edu (Terry Lambert) Cc: current@FreeBSD.org Subject: Re: "Text file busy" with program not running anymore? Message-ID: <199503061835.KAA02220@corbin.Root.COM> In-Reply-To: Your message of "Mon, 06 Mar 95 10:36:07 MST." <9503061736.AA18439@cs.weber.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>> >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503061835.KAA02220>