From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18214 invoked by alias); 3 Aug 2004 12:00:12 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 18195 invoked from network); 3 Aug 2004 12:00:10 -0000 Received: from unknown (HELO thoth.sbs.de) (192.35.17.2) by sourceware.org with SMTP; 3 Aug 2004 12:00:10 -0000 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.12.6/8.12.6) with ESMTP id i73C09so005942 for ; Tue, 3 Aug 2004 14:00:09 +0200 Received: from m20228pp.mchp.siemens.de (m20228pp.mchp.siemens.de [139.23.187.120]) by mail1.siemens.de (8.12.6/8.12.6) with ESMTP id i73C09xA011281 for ; Tue, 3 Aug 2004 14:00:09 +0200 From: Gernot Hillier Organization: Siemens AG To: cygwin@cygwin.com Subject: Re: mapping root directory to SystemDrive / CurrentDrive Date: Tue, 03 Aug 2004 12:00:00 -0000 User-Agent: KMail/1.6.2 References: <200408021452.34000.gernot.hillier@siemens.com> <200408031317.20267.gernot.hillier@siemens.com> <20040803115006.GR31522@cygbert.vinschen.de> In-Reply-To: <20040803115006.GR31522@cygbert.vinschen.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200408031400.08988.gernot.hillier@siemens.com> X-IsSubscribed: yes X-SW-Source: 2004-08/txt/msg00054.txt.bz2 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=20 documented on http://www.cygwin.com/cygwin-ug-net/using.html which says "By= =20 default, the POSIX root / points to the system partition [...]".=20 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 wor= k=20 which is not done yet... ;-) --=20 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/