Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: synopsys!arnold@cs.utexas.edu (Arnold de Leon) Newsgroups: comp.sys.sun Subject: Automounter, pwd and getwd() Keywords: Miscellaneous Message-ID: <9774@brazos.Rice.edu> Date: 6 Jul 90 21:40:54 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 20 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 253, message 11 How are people dealing with the fact that automounter changes where file systems are actually mounted. Here is the scenerio: Machine A: automounts /remote/foo which is actually mounted on /tmp_mnt/remote/foo. A process on Machine A gets its current working directory (it gets /tmp_mnt/remote/foo. It passes this to machine B. Machine B: is also automount /remote/foo, but it is currently umounted. It gets the reference to /tmp_mnt/remote/foo. This does not currently exists, error! One possible fix I can see is to replace pwd with something know enough to strip /tmp_mnt (or whatever the automounter is using for its mount directory). My understanding is that getcwd() uses pwd but not getwd(). So I would solve it only for applications that use getcwd() and pwd. Thanks in advance.