Hi
Like most sites, we have our root.cell mounted at
/afs/pegasus.cranfield.ac.uk and also a short version /afs/pegasus (and
RW mount points at /afs/.peg*).
Up to today, whether one cd'ed to a directory via the short or long
name, subsequent pwds and programs which use getwd() always returned
the long version. I regarded this as a curiosity, since the two
pathnames are functionally equivalent. No big deal.
Now we have some braindead software which works out the name of its
output file by taking the name of the input file, prepending the
working directory as returned by getwd(), then substituting the output
file extension after the first dot in the pathname (yes, that's right,
the first, not the last dot). Every output file ended up as
/afs/pegasus.out, and the software barfed. Obviously, this problem
applies to any directory name with a dot in it AFS, NFS or local, but
only AFS conventionally uses dots.
A colleague suggested that since the long mount point was created
first, maybe deleting and recreating it would force getwd() to see the
short version, which would work around the problem. So I did; OK, now the weird bit.
ccprl@xdm039% cd /afs/pegasus
ccprl@xdm039% pwd
/afs/pegasus
ccprl@xdm039% cd /afs/pegasus.cranfield.ac.uk
ccprl@xdm039% pwd
/afs/pegasus.cranfield.ac.uk
getwd() now appears capable of telling which mount point was used, as I
would originally have though was correct; it does NOT favour the short version.
So what is the "correct" behaviour?
I believe that the current behaviour should be considered correct, but
what do Transarc agree?
Now that it "works", can I rely on it's continuing to do so?
Why did the original setup favour the (longer/older) mount point?
Peter Lister [EMAIL PROTECTED]
Computer Centre,
Cranfield Institute of Technology, Voice: +44 234 754200 ext 2828
Cranfield, Bedfordshire MK43 0AL England Fax: +44 234 750875