Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!apollo!smv From: smv@apollo.HP.COM (Steve Valentine) Newsgroups: comp.sys.apollo Subject: Re: reason to buy Apollos Message-ID: <4b937d4d.20b6d@apollo.HP.COM> Date: 14 Jul 90 01:50:00 GMT References: <9007131342.AA25868@pan.ssec.honeywell.com> Sender: root@apollo.HP.COM Reply-To: smv@apollo.HP.COM (Steve Valentine) Organization: Hewlett-Packard Company, Apollo Division; Chelmsford, MA Lines: 41 Apollo (among others?) lobbied the 1003.1 committee to permit the leading double slash convention. From POSIX 1003.1 (the ugly green book): 2.3 General Terms pathname. ... Multiple successive slashes are considered the same as one slash. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. ... In POSIX-ese, 'may' means that the implementation is permitted, but not required, to treat a leading double slash specially. This means that in order to be POSIX 1003.1 compliant, an application program must not assume that two leading slashes will be collapsed into one, as is traditional in UNIX systems. This means that to be on the safe side you should start paths with three slashes when constructing a path from (possibly null) components, to wit: A shell command such as: pathname=/$TOPDIR/$MIDDLEDIR/$LEAF will result in a potentially troublesome path if $(TOPDIR) happens to be null. To POSIX-proof the script, add a two more slashes: pathname=///$TOPDIR/$MIDDLEDIR/$LEAF Note that adding one slash is insufficient because $(TOPDIR) might not be null. A POSIX 1003.1 compliant OS will always collapse the three slashes into one. The 'implementation-defined' keyword tells the POSIX-ese literate that, the implementation's compliance document must specify what the implementation does if a pathname with two leading slashes is encountered. //node/install/doc/apollo/os.v.10.2__posix is the compliance doc for sr10.2. Steve Valentine - smv@apollo.hp.com Hewlett-Packard Company, Apollo Systems Division, Chelmsford, MA Hermits have no peer pressure. -Steven Wright