getwd.c

Jeffrey Mogul mogul at pa.dec.com
Tue Jun 18 07:30:45 AEST 1991


In article <1991Jun13.111641.8166 at uniwa.uwa.oz> roman at maths.uwa.oz.au (Roman Bogoyev) writes:
>
>	Does anyone have a getwd.c that doesn't get confused by links
>	and automount points?
>					Thanks,
>						Roman.


If you have a copy of the Ultrix source file, or probably the BSD
source file, you can make a 1-character change that will solve the
problem.  Find the line that starts "if (stat(dir->d_name) ..." and
change that "stat" to "lstat".  I *think* this will provide correct
results, but no promises (we've been using it here without any problems).

By the way, the original version doesn't get "confused", it just tends
to run slow when you are automounting from down or slow servers.

If you don't have sources, contact the Customer Support Center and
ask for a patch.  If they say they don't have one, ask them to contact
me (tell them I said it's OK).

Please don't ask me directly for a patched module.

-Jeff



More information about the Comp.unix.ultrix mailing list