This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: "man" hangs attempting to access UNC paths
- From: Adam Dinwoodie <adam at dinwoodie dot org>
- To: cygwin at cygwin dot com
- Date: Fri, 29 Apr 2016 20:49:30 +0100
- Subject: Re: "man" hangs attempting to access UNC paths
- Authentication-results: sourceware.org; auth=none
- References: <1461777815571-126622 dot post at n5 dot nabble dot com> <20160428092204 dot GR2345 at dinwoodie dot org> <1461884948878-126637 dot post at n5 dot nabble dot com> <f556056a-f21a-4035-e0d2-468a7d42cfee at gmail dot com> <1461947529357-126661 dot post at n5 dot nabble dot com> <57239054 dot 1000809 at redhat dot com>
On Fri, Apr 29, 2016 at 10:48:20AM -0600, Eric Blake wrote:
> On 04/29/2016 10:32 AM, joeking wrote:
> > So I figured out what causes this - but I don't know why.
> >
> > "/" ended up in my path - from some imported configuration in .bashrc.
> > When I don't have "/" in the path, then man works.
> >
> > So, given that, why would that cause man to reference UNC paths?
>
> Probably because man has a bug that causes it to use
> ${name_from_path}/suffix, which works fine if ${name_from_path} is
> anything other than /, but which creates a UNC path if it is exactly /.
>
> And the bug is not noticed on other platforms where // and / are identical.
This is, to be clear, a bug, albeit a bug that manifests pretty much
only on Cygwin: POSIX defines paths starting with // as being down to
the implementation to assign meaning, so they're not portable. Most
POSIX or POSIX-like operating systems interpret // as identical to /,
hence it not causing a problem most of the time, but Cygwin uses it for
UNC paths.
--
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