getcwd() and friends.

John F. Haugh II jfh at rpp386.Dallas.TX.US
Wed Apr 5 04:37:39 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.

Cromix worked this way, perhaps not with a fchdir() call, but most of
the system calls under Cromix had file descriptor versions.

However ... all of the information needed for a chdir() is not present
in the file descriptor.  It is possible to be handed a file descriptor
which you would not be able to have opened because some component of
the search path denies access now, but at some point in the past did
allow access.
-- 
John F. Haugh II                        +-Quote of the Week:-------------------
VoiceNet: (214) 250-3311   Data: -6272  | "Porsche does not recommend
InterNet: jfh at rpp386.Dallas.TX.US       |  exceeding any speed limits"
UucpNet : <backbone>!killer!rpp386!jfh  +--        -- Porsche Ad   ------------



More information about the Comp.unix.wizards mailing list