Path: utzoo!attcan!uunet!lll-winken!sol.ctr.columbia.edu!samsung!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.programmer Subject: Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?) Message-ID: <23012:Oct1019:12:2790@kramden.acf.nyu.edu> Date: 10 Oct 90 19:12:27 GMT References: <1977@sixhub.UUCP> <1990Oct7.001518.14216@diku.dk> <1990Oct9.122813.1329@cbnews.att.com> Organization: IR Lines: 8 In article <1990Oct9.122813.1329@cbnews.att.com> jbr0@cbnews.att.com (joseph.a.brownlee) writes: [ why is getpwd() implemented as `pwd` in System V? ] Because there's no getwd() system call to have the kernel do the job. Unless you have some sort of privileges, you won't be able to figure out the current directory when any higher directory is unreadable. ---Dan