DOSFS

Chris Johns cjohns at cybertec.com.au
Tue Jun 3 13:44:01 UTC 2003


Eric Valette wrote:
> Chris Johns wrote:
> 
> 
>> 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.
> 
> 
> I disagree : on Unix in general, you can unlink a file even if the 
> refcount in non zero. In this case it disappear from the file system 
> name space so that no other open can be performed. The file is deleted 
> once the refcount drops to zero. The EBUSY code is a corner case for 
> executable file, as the VM can request pages for running process via 
> paging in and may use the path of the executable...
> 
> At least this is my understanding of EBUSY.
> 

Agreed.


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




More information about the users mailing list