delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:message-id:from:to:subject | |
:content-type:date:in-reply-to:references; q=dns; s=default; b=v | |
u2wfN69gPlR0al2zbzl7OquzL3Te5LdKlQovI9mG7jNFQwdG7c5sW9J+2iKhnHL+ | |
O8gzW7vmxME769m8pAhYkq4n+1Ti0mWRLS28q/6E3oXl6vvgvBn9c+zI/UVLYhod | |
e/Mumtlkpl7ha9HWRcIme2bIZJGQg2j7hXUhfdg4B8= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:message-id:from:to:subject | |
:content-type:date:in-reply-to:references; s=default; bh=HVY3XgH | |
j6VPXDpSz+0T/cXbMnu8=; b=U6XKTYVOAlxteb+fM0Nfv/hvW2forkXTlonSqF5 | |
HvrAdl2JjwhEVpQg763sSF4ygg2ITyX3OSS5tu0HG8RrQDRXqKxNMmExVHT8R480 | |
8QMz3+QhnmrY6neD+aE7sDMVW+vDtFFPEZL3UWMVqBPaBmMO4IzgY8lF20Rxt7QT | |
1E7A= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=much!, much, Hey |
X-HELO: | mout.gmx.net |
MIME-Version: | 1.0 |
Message-ID: | <trinity-f54243ce-a7a4-4920-b65d-c52cb591d70c-1528879699023@3c-app-gmx-bs06> |
From: | "Sven Eden" <sven DOT eden AT gmx DOT de> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Problematic interpretion of paths starting with double slashes |
Date: | Wed, 13 Jun 2018 10:48:19 +0200 |
Sensitivity: | Normal |
In-Reply-To: | <7a4567bc-3312-2da5-9e74-46afafa09fc1@redhat.com> |
References: | <trinity-82173dac-d842-4a87-8d1f-bed9a958d178-1528793630066 AT 3c-app-gmx-bs08> <dc8418d2-2004-97f0-2d8c-ab438f007eba AT redhat DOT com> <trinity-2aa37c55-032a-4631-9d8f-657ecd85e170-1528809265158 AT 3c-app-gmx-bs08> <7a4567bc-3312-2da5-9e74-46afafa09fc1 AT redhat DOT com> |
X-UI-Message-Type: | |
X-IsSubscribed: | yes |
> Gesendet: Dienstag, 12. Juni 2018 um 19:56 Uhr > Von: "Eric Blake" <eblake AT redhat DOT com> > On 06/12/2018 08:14 AM, Sven Eden wrote: > > Good style is nice, but in my book, it is trumped by correct code. Yeah. Point taken. :-D > Hey, let's all assume good intent here. I did not mean what I wrote as > an attack against you, nor am I accusing you of writing the said code, > only that the code you are trying to use (shorthand "your code") is > relying on something non-portable, and is therefore worth improving, > regardless of whether Cygwin also makes a change. I apologize if my > words have come across in a different tone than intended (email tends to > be a lousy medium in that regards). And likewise, I'm not upset at your > reaction to my words. *sigh* ... you are absolutely correct of course. In hindsight, I interpreted more into written words than was available. I am sorry and apologize for being so "touchy". > >>> My question therefore is, whether the behavior can be gotten > >>> nearer what every other GNU/Linux system does. > >>> Maybe, if said first component can not be resolved as an smb > >>> host, try an absolute path instead? > >> > >> That won't work as nicely as you want, because you will introduce long > >> timeouts for every time that Cygwin first has to ascertain that '//tmp' > >> does not exist as a remote host. Maybe we could indeed make '//tmp' > >> resolve to '/tmp' if there is no remote '//tmp' available, but the speed > >> penalties in doing so will not make it pleasant. > > > > The speed penalties would only apply if > > a) "Something" looks up //foo/bar > > b) "Something" made a mistake and actually wanted > > /foo/bar > > > > So apart from the speed penalty that "Something" has to > > suffer, and its their own damn fault, the only real > > consequence would be that "Something" does not die from > > ENOENT any more. > > Indeed, and you may have a valid argument for making that change in > Cygwin; patches are certainly welcome (that is, since //tmp is already > implementation-defined behavior, we can define it to attempt to resolve > to the remove host first, and on ENOENT then attempt to resolve it > locally). It does have one potential minor drawback: right now, at > least bash hard-codes the assumption that on Cygwin, //foo and //foo/ > resolve identically (that is, IF //foo exists, it necessarily behaves as > a directory), using that assumption to reduce the need for network > queries during certain forms of tab completion. If we add the fallback > to trying /foo, that assumption is no longer always the case (it could > be a regular file, symlink, socket, ...). Hmm... that's a good point. So implemeting such a fallback can only be done for anything that is at least "//foo/". > > Am I right that the relevant stuff can be found in > > winsup/cygwin? > > Yes. Then I'll add experimenting with that idea on my TODO list. Thank you very much! Regards Sven -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |