This is hopefully my last question about symlinks.
I’ve read the Unix98/Solo spec, and all it says about
processing symlinks is that they are “interpolated into”
the pathname. Nice $10 expression.
I’m wondering if this is correct:
a) if the content of the symlink begins with a slash,
simply return the content of the symlink.
b) if the content of the symlink does not begin with
a slash, return the full current pathname up to but
not including the symlink, followed by the content
of the symlink.
I’m guessing that I should also append the rest of
the pathname after the symlink to the redirection, right?
So, just to make sure I have all the cases:
pathname “/ramdisk/a”, “a” → “/bin/vi”, return “/bin/vi”
pathname “/ramdisk/a/b”, “a/b” → “c”, return “/ramdisk/a/c”
pathanme “/ramdisk/dir/spud”, “spud” → “/tmp”, return “/tmp/spud”
(Above is interpreted as: given the pathname “xxx”, with a symlink
“yyy”, I should return “zzz” as the redirect out of the io_open).
Is this correct?
Thanks in advance!
Cheers,
-RK
Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.