in reply to Self Deletion
I wrote a user-space filesystem caching program for Ford Motor, and one of the problems was trying to delete (cache out) a file in use. The support scripts for the caching program often had to be removed and couldn't.
The error returned by unlink is ETXTBUSY. A workaround is to detect ETXTBUSY on unlink, and move the file up a directory in the tree with link, and then delete the original with unlink. The i-node isn't removed (and this makes the OS happy) but the directory is emptied (and this makes the programmer happy).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Self Deletion
by bluto (Curate) on Jul 07, 2001 at 19:43 UTC | |
by Anonymous Monk on Jul 07, 2001 at 20:37 UTC |