delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/05/26/19:49:59

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Fri, 26 May 2000 19:49:14 -0400
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: File name syntax (WAS: RE: FW: Can not config sshd)
Message-ID: <20000526194914.B24370@cygnus.com>
Reply-To: cygwin AT sourceware DOT cygnus DOT com
Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com
References: <20000526215054 DOT 0A742F805 AT mx1 DOT hotpop DOT com> <392EFA58 DOT 456793A7 AT veritas DOT com> <20000526190005 DOT A24112 AT cygnus DOT com> <392F0660 DOT CFB8653 AT veritas DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <392F0660.CFB8653@veritas.com>; from rmcgowan@veritas.com on Fri, May 26, 2000 at 04:18:56PM -0700

On Fri, May 26, 2000 at 04:18:56PM -0700, Bob McGowan wrote:
>Chris Faylor wrote:
>> On Fri, May 26, 2000 at 03:27:36PM -0700, Bob McGowan wrote:
>>>If the decision stands to change bash, doesn't that imply a need to fix
>>>the other shells too?
>>
>>Have you seen a lot of traffic about other shells having this problem?
>>I don't recall any.
>
>No.  But then, I also haven't seen a lot of traffic about people using
>lots of //server stuff in scripts, either ;-)

I wouldn't expect people to report non-problems.  How many reports do
you see of 'ls' working correctly?

>I was simply trying to point out a potential problem area, since any
>application (shell or otherwise) working in a UNIX environment does not
>need to worry itself about multiple slash characters anywhere in a path
>name.  So, by implication, any application that uses paths, could
>manifest this problem.  And since the application can be started from
>either a command prompt or a shell, the further implication is that any
>application handling paths would now need modification to be aware of
>this special handling requirement.

As far as I can tell, we are trying to address a specific problem in
bash by making a change to cygwin.  While you can speculate that this
problem is rampant in many other programs, I do not believe that this
is the case.

In fact, for instance, I believe that zsh collapses multiple occurrences
of slashes so it actually does not have this problem.  I don't know about
ash, but we can certainly fix this if so.  I doubt that it does introduce
double backslashes by default, like bash does.

Zsh does have another problem in that it is not compliant with this:

http://www.opengroup.org/onlinepubs/007908799/xbd/glossary.html#tag_004_000_196

This URL comes from the "Single UNIX Specification" and it states:

>pathname
>
>A character string that is used to identify a file.  A pathname consists
>of, at most, {PATH_MAX} bytes, including the terminating null byte.  It
>has an optional beginning slash, followed by zero or more filenames
>separated by slashes.  If the pathname refers to a directory, it may
>also have one or more trailing slashes.  Multiple successive slashes are
>considered to be the same as one slash.  A pathname that begins with two
>successive slashes may be interpreted in an implementation-dependent
>manner, although more than two leading slashes are treated as a single
>slash.  The interpretation of the pathname is described in pathname
>resolution .

This issue has come up many times in the past.  Neither cygwin nor
Windows NT is "non compliant" in the special handling of the double
backslash at the start of a path.  There have been UNIX (or at least
UNIX-like) OS's which interpret paths with a leading // specially.

I normally am a big fan of fixing things in one place and I have been
known to stand on my head, play the ukulele, and spin counter-clockwise
in attempts to make cygwin behave more like UNIX.  I'm just not
convinced that eliminating the use of a // is advisable.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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