Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.programmer Subject: Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?) Message-ID: <4186@auspex.auspex.com> Date: 13 Oct 90 21:08:37 GMT References: <1990Oct10.231857.11668@virtech.uucp> <14976@hydra.gatech.EDU> <1990Oct11.165733.17946@Neon.Stanford.EDU> Organization: Auspex Systems, Santa Clara Lines: 9 > * Getwd changes directories (uses the system call chdir) to figure out > which directory you are in. If there is an error, getwd may not be > able to change back to the directory you were in when you called it. > If this occurs, any files created will be in the wrong place. That may be true on your system - the 4.2BSD "getwd()" routine did, in fact, use "chdir()" - but it's not ture on all systems; the 4.3BSD "getwd()" doesn't use "chdir()".