From: "Sven Eden" <sven.eden@gmx.de>
To: cygwin@cygwin.com
Subject: Re: Problematic interpretion of paths starting with double slashes
Date: Wed, 13 Jun 2018 13:05:00 -0000 [thread overview]
Message-ID: <trinity-f54243ce-a7a4-4920-b65d-c52cb591d70c-1528879699023@3c-app-gmx-bs06> (raw)
In-Reply-To: <7a4567bc-3312-2da5-9e74-46afafa09fc1@redhat.com>
> Gesendet: Dienstag, 12. Juni 2018 um 19:56 Uhr
> Von: "Eric Blake" <eblake@redhat.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
next prev parent reply other threads:[~2018-06-13 8:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 11:45 Sven Eden
2018-06-12 11:52 ` Adam Dinwoodie
2018-06-12 16:28 ` Eric Blake
2018-06-12 17:12 ` Aw: " Sven Eden
2018-06-12 17:57 ` Brian Inglis
2018-06-13 10:14 ` Aw: " Sven Eden
2018-06-13 13:49 ` Andrey Repin
2018-06-15 2:41 ` Brian Inglis
2018-06-12 20:01 ` Aw: " Eric Blake
2018-06-13 13:05 ` Sven Eden [this message]
2018-06-12 20:32 ` Lee
2018-06-13 13:05 ` Aw: " Sven Eden
2018-06-12 23:31 ` Aw: " Achim Gratz
2018-06-13 9:57 ` Corinna Vinschen
2018-06-13 13:29 ` Sven Eden
2018-06-13 19:32 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-f54243ce-a7a4-4920-b65d-c52cb591d70c-1528879699023@3c-app-gmx-bs06 \
--to=sven.eden@gmx.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).