delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <4D6282CF.1000606@towo.net> |
References: | <20110217120400 DOT GB29762 AT calimero DOT vinschen DOT de> <4D600C0A DOT 9080305 AT etr-usa DOT com> <4D6273C4 DOT 9050406 AT redhat DOT com> <4D6282CF DOT 1000606 AT towo DOT net> |
Date: | Sat, 26 Feb 2011 03:24:53 +0300 |
Message-ID: | <AANLkTikbs8k+V1+74jmdvAUynM_-2HZOJ_yqYEN2DF5z@mail.gmail.com> |
Subject: | Re: Please test latest developer snapshot |
From: | Vorfeed Canal <vorfeed DOT canal AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | Thomas Wolff <towo AT towo DOT net> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
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 Mon, Feb 21, 2011 at 6:20 PM, Thomas Wolff <towo AT towo DOT net> wrote: > And this is not an artificial limitation but there is no way that this > could conceivably work. What do you mean "there is no way that this could conceivably work"? It worked in Linux till it was explicitly forbidden... See here, for example: http://lkml.org/lkml/1997/9/12/100 > By Unix design, removing a file or directory basically means removing > its entry from its parent directory, so it is not an operation on the > file in the first place (or on the target directory in this case). Well, yeah - and this explains all subsequent effects. Directories are not files, directory can only have one name at most so there are no confusion. > The parent directory is obviously needed by design, thus "." is not > something that could ever be removed (from where?). From filesystem? This artificial limitation was added to POSIX (and later to Linux) to fix some old broken scripts. I'm not sure if it was good idea or not, but it's written in a standard now so that's how it works. But yes, it IS quite artificial limitation: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/namei.c;h=0087cf9c2c6bccaf99000fbd0bfe95257549d81b;hb=HEAD#l2866 As you can see the only reason you can not rmdir(".") and then rmdir("..") is because it's quite explicitly checked for to satisfy POSIX. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |