getwd() call problems
Jean-Francois Lamy
lamy at ai.utoronto.ca
Mon Dec 11 08:44:52 AEST 1989
teraida!mikel at decwrl.dec.com (Mikel Lechner) writes:
>kae at 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 at ai.utoronto.ca, uunet!ai.utoronto.ca!lamy
AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4
More information about the Comp.sys.sun
mailing list