More 1.3.11 road show

Christopher Faylor cgf-cygwin@cygwin.com
Wed Jun 5 08:42:00 GMT 2002


On Wed, Jun 05, 2002 at 05:10:24PM +0200, Pavel Tsekov wrote:
>[snip]
>CF> What this means is that if you do something like this:
>
>c:\>>pwd > d:\tmp\foo
>
>CF> and you've previously done a
>
>CF> mount -b d:\tmp /dtmp
>
>CF> then the line endings in d:\tmp\foo will be \n rather than \r\n.
>
>I've done some simple tests and it works for me. One question though:
>
>Consider this situation - I have drive C mounted on /cygdrive/c/ as
>binary and I have C:\Temp mounted on /ctmp as text. Now redirecting the
>output of 'pwd' to a file in /cygdrive/c/Temp/ gives me UNIX line
>endings, while redirecting it to /ctmp gives me DOS line endings. Is
>this intended ? Shouldn't the /ctmp mount override the settings for
>/cygdrive/c/Temp ?

No.  You can mount the same dos directory/file with multiple posix paths
and use different settings for each posix path.  When you access the posix
path in cygwin, the setting of the specific posix path will be used.  /cygdrive
is just another posix path in this case.

FWIW, this question has little to do with the issue you have tested.  If
you're using /cygdrive/c, you're probably inside a bash shell.
Redirection inside of shells has always correctly set binmode/textmode
based on mount, afaik.

It was the case of redirection from the dos command line that the recent
changes were supposed to handle.  Since the only information available
to cygwin at startup is (essentially) the dos path, cygwin has to guess
at the posix path associated with the dos path.  It will use /cygdrive/x
only if the dos path isn't specifically found in the mount table.

cgf

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



More information about the Cygwin mailing list