Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Gernot Hillier Organization: Siemens AG To: cygwin AT cygwin DOT com Subject: Re: mapping root directory to SystemDrive / CurrentDrive Date: Tue, 3 Aug 2004 14:00:08 +0200 User-Agent: KMail/1.6.2 References: <200408021452 DOT 34000 DOT gernot DOT hillier AT siemens DOT com> <200408031317 DOT 20267 DOT gernot DOT hillier AT siemens DOT com> <20040803115006 DOT GR31522 AT cygbert DOT vinschen DOT de> In-Reply-To: <20040803115006.GR31522@cygbert.vinschen.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Message-Id: <200408031400.08988.gernot.hillier@siemens.com> X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i73C0KXL001273 Hi! Am Dienstag, 3. August 2004 13:50 schrieb Corinna Vinschen: > > Because I think it's not good when in such a situation open("/a/b") > > refers to another file than stat("/a/b"). > > Actually it doesn't in the first place. stat() tries to open the file > first, the same as when calling open(). But since the file doesn't exist, > opening it fails and stat() falls back to standard Win32 calls which treat > the path differently, as you observed. If we wouldn't do that, another > problem would occur; stat() would fail in cases where it shouldn't. Ok, > there might be a way to workaround that, but it would require somebody > interested to patch it. http://cygwin.com/acronyms/#PTC Ah, thanks for the explanation! > > I can imagine quite some problems caused in Linux programs by such > > behaviour of the system... > > Keep in mind that this only happens if / isn't mounted -> back to > undocumented behaviour. Well, this is not undocumented. The case without mounts is explicitly documented on http://www.cygwin.com/cygwin-ug-net/using.html which says "By default, the POSIX root / points to the system partition [...]". And this is (IMHO) a little bit in contrary to the current stat() behaviour... But I certainly can see and understand your point that it requires some work which is not done yet... ;-) -- Thx again, Gernot Hillier CT SE 2 Siemens AG, Mch P -- 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/