delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/25/10:18:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 25 Jan 2009 10:17:51 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [bugreport] Two slashes should not indicate remote machine or special directory
Message-ID: <20090125151751.GA9371@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <497C6D52 DOT 5050504 AT dazjorz DOT com> <497C72F8 DOT 8040503 AT byu DOT net> <497C7785 DOT 3000605 AT dazjorz DOT com>
MIME-Version: 1.0
In-Reply-To: <497C7785.3000605@dazjorz.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Note-from-DJ: This may be spam

On Sun, Jan 25, 2009 at 03:30:29PM +0100, Sjors Gielen wrote:
> Eric Blake schreef:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> According to Sjors Gielen on 1/25/2009 6:46 AM:
>>> Hey all,
>>>
>>> In Cygwin (the CVS version), it seems paths starting with two slashes
>>> are "special paths" for accessing remote machines or bypassing the mount
>>> table.
>>>
>>> This however is incompatible with Linux, where i.e. //etc is a valid
>>> path. See, for example: (`ls` indicators removed for readability)
>> Not only is it perfectly compatible with Linux, but it is allowed by
>> POSIX.  This is a design decision that all portable programs must be aware
>> of - you cannot blindly use '//' to mean '/', and not just because of 
>> cygwin.
>> http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_266
>> http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12
>> "A pathname that begins with two successive <slash> characters may be
>> interpreted in an implementation-defined manner, although more than two
>> leading <slash> characters shall be treated as a single <slash> 
>> character."
>>> Therefore, I'm suggesting to remove "//" as a
>>> special path from conv_to_win32_path.
>> Won't happen.  We've intentionally defined it as a synonym for Windows
>> \\server\share notation.
>
> I figured this was by design, but I didn't know there was an explicit 
> exception in POSIX for this.
> However, as I'm sure you're aware, there are a lot of Linux applications 
> which depend on, for example, //etc being the same as /etc. These all have 
> to be patched to use ///etc or /etc.
>
> How much of Cygwin will be broken if we remove //remoteserver as an 
> equivalent to Windows \\remoteserver? Wouldn't it be a better solution to 
> provide an alternative for //remoteserver, i.e. /cygdrive/net/remoteserver 
> or maybe even net://remoteserver or smb://remoteserver? This would fix both 
> the problem with Linux compatibility, and still leave this feature in 
> Cygwin.

We are not going to change this very long standing Cygwin behavior.  It is not
a bug.

cgf

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