mirror of https://github.com/mkerrisk/man-pages
realpath.3: Remove note about Solaris possible returning an relative path
As reported by Casper Dik: For some reason, many of the realpath() manual pages (BSD, Linux) have words to the following effect: Solaris may return a relative pathname when the path argument is relative. I have looked through the Solaris source files and have found no such bug reported or fixed; the implementation from at least 1997 and beyond certainly doesn't have this problem and even the older versions prepend getcwd() or chdir() to dirname and run getcwd() in that directory. Solaris does have a system call which may return relative pathnames: resolvepath(). I believe that that function may have confused earlier writers of realpath() manual pages and this was later copied without verifying that fact. realpath() existed in Solaris 2.0 as it came from SVr4.0 and even at that time it returned the full, non-relative path. Reported-by: Casper.Dik@oracle.com Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a00b7454b8
commit
8f826cd8f2
|
@ -23,7 +23,7 @@
|
|||
.\" Rewritten old page, 990824, aeb@cwi.nl
|
||||
.\" 2004-12-14, mtk, added discussion of resolved_path == NULL
|
||||
.\"
|
||||
.TH REALPATH 3 2011-09-10 "" "Linux Programmer's Manual"
|
||||
.TH REALPATH 3 2012-05-05 "" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
realpath \- return the canonicalized absolute pathname
|
||||
.SH SYNOPSIS
|
||||
|
@ -166,11 +166,15 @@ A typical source fragment would be
|
|||
.LP
|
||||
(But see the BUGS section.)
|
||||
.LP
|
||||
The 4.4BSD, Linux and SUSv2 versions always return an absolute
|
||||
pathname.
|
||||
Solaris may return a relative pathname when the
|
||||
.I path
|
||||
argument is relative.
|
||||
.\" 2012-05-05, According to Casper Dik, the statement about
|
||||
.\" Solaris was not true at least as far back as 1997, and
|
||||
.\" may never have been true.
|
||||
.\"
|
||||
.\" The 4.4BSD, Linux and SUSv2 versions always return an absolute
|
||||
.\" pathname.
|
||||
.\" Solaris may return a relative pathname when the
|
||||
.\" .I path
|
||||
.\" argument is relative.
|
||||
The prototype of
|
||||
.BR realpath ()
|
||||
is given in \fI<unistd.h>\fP in libc4 and libc5,
|
||||
|
|
Loading…
Reference in New Issue