Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157321574
D55928.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55928.id.diff
View Options
diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3
--- a/lib/libc/stdlib/realpath.3
+++ b/lib/libc/stdlib/realpath.3
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 10, 2025
+.Dd March 18, 2026
.Dt REALPATH 3
.Os
.Sh NAME
@@ -75,27 +75,24 @@
is called, and all but the last component must name either directories or
symlinks pointing to the directories.
.Sh "RETURN VALUES"
-The
+On success, the
.Fn realpath
function returns
.Fa resolved_path
-on success.
-If the function was supplied
-.Dv NULL
-as
-.Fa resolved_path ,
-and operation did not cause errors, the returned value is
-a null-terminated string in a buffer allocated by a call to
-.Fn malloc 3 .
+if it was not
+.Dv NULL ,
+or a pointer to a null-terminated string which must be freed by the
+caller if it was.
If an error occurs,
.Fn realpath
returns
.Dv NULL ,
and if
.Fa resolved_path
-is not
+was not
.Dv NULL ,
-the array that it points to contains the pathname which caused the problem.
+the array that it points to contains the pathname which caused the
+problem.
.Sh ERRORS
The function
.Fn realpath
@@ -107,6 +104,9 @@
and
.Xr getcwd 3 .
.Sh SEE ALSO
+.Xr basename 3 ,
+.Xr dirname 3 ,
+.Xr free 3 ,
.Xr getcwd 3
.Sh STANDARDS
The
@@ -118,15 +118,3 @@
.Fn realpath
function first appeared in
.Bx 4.4 .
-.Sh CAVEATS
-This implementation of
-.Fn realpath
-differs slightly from the Solaris implementation.
-The
-.Bx 4.4
-version always returns absolute pathnames,
-whereas the Solaris implementation will,
-under certain circumstances, return a relative
-.Fa resolved_path
-when given a relative
-.Fa pathname .
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 21, 7:57 AM (17 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29987641
Default Alt Text
D55928.id.diff (1 KB)
Attached To
Mode
D55928: realpath: Improve manual page
Attached
Detach File
Event Timeline
Log In to Comment