Why use pwd(1) for getpwd(3C)? (Re: Why use find?)
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Thu Oct 11 05:12:27 AEST 1990
In article <1990Oct9.122813.1329 at cbnews.att.com> jbr0 at 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
More information about the Comp.unix.programmer
mailing list