DOSFS

Chris Johns cjohns at cybertec.com.au
Tue Jun 3 13:18:50 UTC 2003


Victor V. Vengerov wrote:
> 
> Have in mind that if you open file and then delete it, directory entry
> deleted immediately, but file itself (cluster chain on the disk) will
> be deleted only when all tasks close this file. 

Is this correct behaviour ? The Single Unix Standard for unlink() states in the 
error codes:

  [EBUSY]
     The file named by the path argument cannot be unlinked
     because it is being used by the system or another process
     and the implementation considers this an error.

My reading is an open() then unlink() should fail.

> If the system shutdown
> keeping the files opened, lost chains may occurs.

When are the contents of an updated directory or the FAT sync'ed ?

-- 
  Chris Johns, cjohns at cybertec.com.au




More information about the users mailing list