Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrlnk!uunet!mcvax!hp4nl!uva!betty!casper From: casper@uva.UUCP (Casper H.S. Dik) Newsgroups: comp.unix.wizards Subject: Re: Nullpath in system calls considered harmful? Message-ID: <613@uva.UUCP> Date: 4 Feb 89 11:53:29 GMT References: <88368@sun.uucp> Sender: news@uva.UUCP Reply-To: dik@uva.UUCP (Casper H.S. Dik) Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 31 In article <88368@sun.uucp> lm@sun.UUCP (Larry McVoy) writes: >Hi- > A question for oldtimers: is there any good reason that null paths > (ie, open("", flags)) should NOT be considered an error. If you don't > already know that many kernels translate "" into "." you probably > can't answer this question. POSIX wants "" to be an error. > >Thanks, > >Larry McVoy, Lachman Associates. My opinions are that. I'm not an oldtimer, but I think that disallowing the null path would break many programs. The main reason why kernels translate "" into "." is beacause of paths containing //. Try: % cp -i vmunix / it responds with: replace //vmunix? Many more programs are affected by this. They all think / will always give a valid pathname. If validdir = "/" this breaks. If POSIX still allows // in pathnames (do they?), then they disallow only one special case of null paths, I would say that that's a bad idea. --cd ____________________________________________________________________________ Casper H.S. Dik University of Amsterdam | dik@uva.uucp The Netherlands | ...!uunet!mcvax!uva!dik