Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: /bin/pwd Message-ID: <4063@auspex.auspex.com> Date: 14 Sep 90 20:49:45 GMT References: <2488@idunno.Princeton.EDU> <1990Sep14.002232.29540@virtech.uucp> Organization: Auspex Systems, Santa Clara Lines: 9 >On System V style systems, getcwd(3) popen(3)'s "/bin/pwd" to get >the current workind directory. On some, anyway. That's how S5 from AT&T - at least prior to S5R4 - implements "getcwd()", but you could have "getcwd()" be the routine that does the work (just like "getwd()", but with bounds checking) and have "/bin/pwd" just call it. (SGI basically does that in recent releases, although "getcwd()" ends up calling a BSD-flavored "getwd()" to do the actual work). Dunno whether S5R4 does that or not.