Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: /bin/test and stat(2) Message-ID: <30667@sun.uucp> Date: Mon, 12-Oct-87 14:37:22 EDT Article-I.D.: sun.30667 Posted: Mon Oct 12 14:37:22 1987 Date-Received: Tue, 13-Oct-87 06:32:03 EDT References: <9723@brl-adm.ARPA> <1063@moscom.UUCP> Sender: news@sun.uucp Lines: 17 > I think it has been in since the beginning. I believe it was considered > a feature but wouldn't be surprised if part of the reason was that it was > faster, Probably not; the time spent testing one byte of the string is minimal compared to the time spent doing the rest of "namei". > If JJ Programer only wants to code on SysVid Compliant machines then > they can assume stat("",&b) and test -d "" will return ENOENT and false > resepctively. Guess again; the SVID says nothing more than "a null string is undefined and *may* be considered an error" (emphasis mine). There will certainly be SVID-compliant systems that treat a null string as a synonym for ".". Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com