This is the mail archive of the
mailing list for the Cygwin project.
Re: Unable to delete directory in Cygwin
On Fri, Jun 16, 2006 at 08:59:12AM -0400, Brett Serkez wrote:
>>>>>NTFS and FAT file systems simply do not have the concept of inodes,
>>>>>Cygwin is dependent upon the facilities supplied by these file systems.
>>>>Actually NTFS does have something like an inode. That's what Cygwin
>>>Then why does this fail? Please enlighten us?
>This is the same email thread, nothing here that helps explain what
I doubt that anyone has access to Windows source code so the only thing
you can do is mention how things work on Windows and move on. On
Windows, and on some UNIX systems, you can't delete a directory if
someone is cd'ed to it.
>Rereading it all I see is the reference to open handles/handlers
>(Windows/UNIX terminology). This is precisely what an inode does in a
>Linux/UNIX file system, the kernel is given the inode to hold as the
>handle to the open file. If the directory entry is detached from this
>inode, no problem, but the file is still open and exists. Ultimately
>the only difference is that UNIX/Linux says no problem, Windows
>generates an error due to this difference.
On linux, a directory still has an inode after it is deleted.
>>It has nothing to do with inodes. There have been versions of UNIX
>>which didn't allow you to remove a directory when someone has cd'ed to
>Well, the UNIX/Linux rules don't change in this regard, this area has
>been stable for as long as I've been using UNIX/Linux (20+ years).
>This is one of the great strengths of UNIX, the basic rules are
>simple, well understood and stable. When you cd to a directory, you
>are maintaining the directory as a open file. It is more likely the
>specific file system in use does or doesn't support inodes.
I' really am not interested in arguing with you. There have been UNIX
systems which fully supported inodes which did not allow you to remove
an active directory. I have been using a wide variety UNIX systems for
24+ years so I guess my experience trumps yours.
(and, that plus $1.00+ will get me a cup of coffee)
Windows does support the concept of an inode-like-thing on NTFS
filesystems and that is what I was trying to clarify. I don't see any
reason to write multi-paragraph treatises on the subject when it doesn't
really matter one way or the other.
The windows behavior is a simple statement of "That is the way it works".
If you want to research how Windows works under the hood then maybe google
has more information. I'm not sure how it will benefit anyone, though.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html