www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/16/09:31:51

X-Spam-Check-By: sourceware.org
Date: Fri, 16 Jun 2006 09:31:32 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Unable to delete directory in Cygwin
Message-ID: <20060616133132.GF10880@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1F211FE03383644EAA6BB7A52FCD9B9B0927A0 AT sohm DOT kpit DOT com> <1F211FE03383644EAA6BB7A52FCD9B9B0927A4 AT sohm DOT kpit DOT com> <143umqixuj7aa$.q6uf55wgjg5t$.dlg AT 40tude DOT net> <a5f030530606160435o3a8cdd3bne0c4899cbeebdfad AT mail DOT gmail DOT com> <20060616122412 DOT GB10880 AT trixie DOT casa DOT cgf DOT cx> <a5f030530606160528x5b5ebf5bm93e1be8d601e6fcb AT mail DOT gmail DOT com> <20060616123743 DOT GC10880 AT trixie DOT casa DOT cgf DOT cx> <a5f030530606160559r11ecf1far9a78eb2180b1500d AT mail DOT gmail DOT com>
Mime-Version: 1.0
In-Reply-To: <a5f030530606160559r11ecf1far9a78eb2180b1500d@mail.gmail.com>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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
>>>>uses.
>>>
>>>Then why does this fail?  Please enlighten us?
>>
>>http://cygwin.com/ml/cygwin/2006-06/msg00347.html
>
>This is the same email thread, nothing here that helps explain what
>I'm asking.

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
>>it, too.
>
>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.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019