delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/22/10:46:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Thu, 22 May 2003 10:45:08 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Ronald Landheer-Cieslak <ronald AT landheer DOT com>
cc: cygwin AT cygwin DOT com, <Rolf DOT Guigas AT t-online DOT de>
Subject: Re: echo and CYGWIN variable
In-Reply-To: <Pine.LNX.4.44.0305221422540.11290-100000@localhost.localdomain>
Message-ID: <Pine.GSO.4.44.0305221043120.7611-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Thu, 22 May 2003, Ronald Landheer-Cieslak wrote:

> On Wed, 21 May 2003, Igor Pechtchanski wrote:
> > Whenever you redirect to a file, the mount table is consulted, and the
> > appropriate mode is selected (i.e., CYGWIN has no effect).  If you use
> > Win32 paths, there are no entries in the mount table, so I'm not quite
> > sure what's going on.
> Correct me if I'm wrong (please), but I thought this worked like this:
> 1) d:/foo -> /cygdrive/d/foo
> 2) look in mount table
> the mount type (bin or text) is whatever the parent of /cygdrive/d/foo is,
> which is /cygdrive/d -> /cygdrive -> /
> if / is binmode, (and there's nothing between /cygdrive/d/foo and / in the
> mount table), /cygdrive/d/foo is binmode.
>
> But please, enlighten me if this is not how it works :)
>
> > You could try using backslashes instead of forward slashes (I think
> > those force textmode),
> If so, where does this:
> d:\\foo -> d:/foo -> /cygdrive/d/foo
> break?
>
> rlc

That's not quite how it works, Ronald.  You were right in tracing back to
/cygdrive, but you should have realized that /cygdrive is a mount in
itself, and it will not get further reduced to "/".  So, if you use the
/cygdrive/d syntax, it will use the mode on the /cygdrive mount.  If you
use the d:\\ syntax, the files will be opened using raw Win32 calls, and
who knows what the mode will be (ISTR that it defaults to text).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019