Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: lamy@ai.utoronto.ca (Jean-Francois Lamy) Newsgroups: comp.sys.sun Subject: getwd() call problems Keywords: Networks Message-ID: <3880@brazos.Rice.edu> Date: 10 Dec 89 21:44:52 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 18 Approved: Sun-Spots@rice.edu X-Refs: Original: v8n213 X-Sun-Spots-Digest: Volume 8, Issue 221, message 8 of 10 teraida!mikel@decwrl.dec.com (Mikel Lechner) writes: >kae@ihlpm.att.com (Kenneth A Edwards) writes: >With SunOS4.0 and later releases, Sun introduced a "performance >improvement" to the "getwd()" library call. The library function ends up >"stat()"ing virtually all your mounted filesystems every time your program >tries to compute its working directory. This is nearly guaranteed to hang >up any process makeing a "getwd()" call when a hard-mounted NFS filesystem >hangs. Using trace(1) you can easily determine that getwd() will not follow symbolic links. So you can avoid this problem by making sure that all NFS entries in /etc/fstab are actually symbolic links (i.e. mount on the symlink -- mount will follow the symlink at mount time and mount on the directory referenced by the symlink). Jean-Francois Lamy lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4