Xref: utzoo comp.unix.wizards:15393 comp.databases:2275 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!amdahl!pacbell!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards,comp.databases Subject: Re: getcwd() and friends. Message-ID: <8136@chinet.chi.il.us> Date: 5 Apr 89 18:28:25 GMT References: <3675@ficc.uu.net> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Followup-To: comp.unix.wizards Organization: Chinet - Public Access Unix Lines: 14 In article <3675@ficc.uu.net> peter@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