Re: realpath(3) bugs

Casper.Dik-QHcLZuEGTsvQT0dZR+AlfA
2012-05-05T18:34:50Z

>I am not sure something needs to be removed. One might write
>"early versions of" when something is no longer true in recent versions.

I've looked through earlier SunOS versions and I didn't find
it n SunOS 3.5 but I did find it in SunOS 4.1.1. The code
simply starts with:

if pathname doesn't start with '/' prepend the current
working directory.

That code looks very much like the earlier SvR4 code; so I think
that if the SunOS manual page says that, it was incorrect as
the code will either fail or it will return an absolute pathname.
(Any error cass the code to return NULL)
Just like the current Solaris realpath(3c) manpage incorrectly
says that realpath() can change your cwd on error; this
cannot happen since Solaris 9 but was not removed)

So if i ever happened in SunOS it may happened in SunOS 4.0,
so I think it is still not correct to claim that "Solaris"
ever didn't return an absolute pathname; the first of
Solaris was SunOS 4.1.2 (Solaris 1.0) and that already
only returned an absolute pathname.

Casper