On what systems is //foo/bar different from /foo/bar?
127
votes
9
answers
12500
views
Throughout the POSIX specification, there's provision ((http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/basedefs/V1_chap03.html#tag_03_267) , (http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/basedefs/V1_chap04.html#tag_04_12) , (http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/utilities/dirname.html)...) to allow implementations to treat a path starting with two
/
specially.
A POSIX application (an application written to the POSIX specification to be portable to all POSIX compliant systems) cannot assume that //foo/bar
is the same as /foo/bar
(though they can assume that ///foo/bar
is the same as /foo/bar
).
Now what are those POSIX systems (historical and still maintained) that treat //foo
specially? I believed (I've now [been proven wrong](http://thread.gmane.org/gmane.comp.standards.posix.austin.general/11947/focus=11965)) that POSIX provision was pushed by Microsoft for their Unix variant (XENIX) and possibly Windows POSIX layer (can anyone confirm that?).
It is used by Cygwin which also is a POSIX-like layer for Microsoft Windows. Are there any non-Microsoft Windows systems? OpenVMS?
On systems where //foo/bar
is special, what is it used for? //host/path
for network file systems access? Virtual file systems?
Do some _applications_ running on Unix-likes —if not the system's API— treat //foo/bar
paths specially (in contexts where they otherwise treat /foo/bar
as the path on the filesystem)?
---
**Edit**, I've since [asked a question on the austin-group mailing list](http://thread.gmane.org/gmane.comp.standards.posix.austin.general/11947) about the origin of //foo/bar
handling in the spec, and the discussion is an interesting read (from an archaeology point of view at least).
Asked by Stéphane Chazelas
(579422 rep)
Jan 20, 2016, 10:20 AM
Last activity: Jun 27, 2022, 07:07 PM
Last activity: Jun 27, 2022, 07:07 PM