This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mapping root directory to SystemDrive / CurrentDrive


On Aug  3 13:17, Gernot Hillier wrote:
> Hi Corinna!
> 
> Thx for your quick reply!
> 
> Am Dienstag, 3. August 2004 12:51 schrieb Corinna Vinschen:
> > > And anyway, I assume that it is a bug that both system calls behave
> > > different, right?
> >
> > That's a result of using NtCreateFile instead of CreateFile.  Native NT
> > calls behave slightly different than Win32 calls.  However, as you said,
> > you're relying on undocumented behaviour.  
> 
> Ok, so there's no easy way to switch to the old behaviour. Bad for us, but 
> well - our problem... :-(
> 
> But still there's one open question for me: are there plans to change the 
> behaviour of stat(), too?
> 
> 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

> 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.

> > I'm sorry but we won't revert to Win32 calls just to keep an undocumented
> > behaviour running. 
> 
> Hmmm, is there any other way how one can use two different Cygwin 
> installations in parallel beside using no mounts?

I'm sorry, but that's generally not supported.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]