This is the mail archive of the cygwin@sourceware.cygnus.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: File name syntax (WAS: RE: FW: Can not config sshd)


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]