Newsgroups: comp.unix.internals Path: utzoo!utgpu!watserv1!maytag!mks.com!femto!eric From: eric@mks.com (Eric Gisin) Subject: Re: replacement getwd(3). Sender: eric@mks.com (Eric Gisin) References: <1431@carol.fwi.uva.nl> Followup-To: comp.unix.internals Reply-To: eric@mks.com (Eric Gisin) In-Reply-To: casper@fwi.uva.nl's message of 7 Nov 90 09:57:49 GMT Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA Date: 7 Nov 90 13:14:25 Message-ID: In article <1431@carol.fwi.uva.nl> casper@fwi.uva.nl (Casper H.S. Dik) writes: I've written a replacement getwd(3) for SunOS 4.x that returns ~user/tail (with ~user expanded as in /etc/passwd) if the current directory is a subdirectory of a user's home directory. [The original might return: /tmp_mnt/foo/bar/bletch/usrs/casper/dir the new returns /usr/casper/dir] I've installed it in my own copy of the shared library and thinks seem to work fine. My question is: what utilities (if any) will break because of this? Ideally none would break, because any properly written program on SysV or SunOS would use getcwd(), not getwd(). Any program that effectively does chdir(getwd()) would break with your getwd. ~ expansion is handled by applications, not libc and the kernel.