replacement getwd(3).

Eric Gisin eric at mks.com
Wed Nov 7 13:14:25 AEST 1990


In article <1431 at carol.fwi.uva.nl> casper at 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.



More information about the Comp.unix.internals mailing list