Text file busy
Terry Lambert
tlambert2 at mindspring.com
Fri Sep 5 00:38:05 PDT 2003
Paul Richards wrote:
> Overwriting a file that's currently executing results in a "Text file
> busy" error.
>
> When did this start happening?
>
> This was something that was fixed way back on FreeBSD but it seems to be
> a problem again.
You are opening an existing file for write. You need to rename
on top of it, or delete and create a new one, and this will not
happen.
The issue is that the pages in the executing file are not
necessarily all in core, so it can't copy-on-write them, since
it doesn't know that they are being dirtied.
The copy-on-write behaviour is relatively new; old System V
and Xenix system did not permit even deleting an executing
file, since the process did not hold an open file reference
on the file.
-- Terry
More information about the freebsd-current
mailing list