DOSFS
Eric Valette
eric.valette at free.fr
Tue Jun 3 13:58:56 UTC 2003
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.
--
__
/ ` Eric Valette
/-- __ o _. 6 rue Paul Le Flem
(___, / (_(_(__ 35740 Pace
Tel: +33 (0)2 99 85 26 76 Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette at free.fr
More information about the users
mailing list