getcwd() and friends.

Leslie Mikesell les at chinet.chi.il.us
Thu Apr 6 04:28:25 AEST 1989


In article <3675 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>One thing that really would make things a lot easier would be a fchdir()
>call, that took a file descriptor and tried to chdir to it. All the info
>that UNIX needs for the chdir is available via the fd.
>

Better yet would be a per-process *name* of the current working
directory stored somewhere, built according the the way you
happened to get there.  This would make getcwd() amount to printing
static data instead of the contortions it does now, and as a
side effect, it would make ".." mean something unsuprising in the
presence of linked directories.  Is there some reason this isn't done?

Les Mikesell



More information about the Comp.unix.wizards mailing list