This is the mail archive of the cygwin@cygwin.com 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]

Re: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff)


On Mon, Sep 24, 2001 at 09:24:23PM +0200, Ronald Landheer wrote:
> directories exist before listing the magic ones. The only problem I 
> forsee is that they might start conflicting with eachother - i.e. if I 
> make a *file* called /dev/tty and I write stuff to it, it might end up 
> in the file in stead of the device.

Nope.  Even if the file exists, opening and writing will ever
end up in the device.  That's not a problem even right now.

> I wouldn't mind having the fhandler just not allow actual file vs. 
> device conflicts - let the "magic" one override the actual one, and 
> remove the actual one if it's offensive. /dev is no place for files 
> anyway - it's like storing data in a void, storing icecream in a 
> volcano: it doesn't last, it's not a good idea, and noone in his/her 
> right mind would do it.. Symlinks are another matter, but the same 
> precedence would apply: symlinks are meant to make life a bit easier, 
> but don't contain any actual data, so if an magic dir would conflict 
> with a symlink, the symlink would have to go..

IMO it doesn't matter.  Files are listed as files, symlinks as
symlinks.  If somebody creates a file called like a device
(which is only possible outside of Cygwin processes) it will
exist but has no further influence except, perhaps, that the
corresponding device will be listed twice.

> In the case of both /cygdrive and /registry, I simply wouldn't allow the 
> existance of real files - though Win32 will mess that up, ofcourse.

Yep, that's it.  You can't prevent it.  The question is just if
the fhandler has to list it or not.

Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]