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/