Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Ronald Landheer" To: "Corinna Vinschen" Subject: RE: [PATCH] ls & "magic" cygdrive dir (was: RE: cygdrive stuff) Date: Mon, 24 Sep 2001 23:17:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20010924224135.C16412@cygbert.vinschen.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id f8OLJ1M20531 Hello Corinna /et al/, Corinna wrote: > 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. OK, let's keep it that way ;) >> 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. I didn't know Cygwin was that safe :) So, if I understand correctly, devices *always* take precedence over files? Conflicts between them are *absolutely* impossible? Just making sure - seems too good to be true :) >> 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. In the case of real file where they're not supposed to be, I'd say not: make them completely invisible. They're not supposed to be there - ignore them. No stat(), no listing, nothing. People will probably whine about it though.. (Q: "I put a file in /registry but I can't fopen() it!" A: "http://www.tuxedo.org/~esr/faqs/smart-questions.html") Greetz! Ronald -- 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/