From nobody Wed Mar 25 00:47:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fgStY3MPvz6WRkt for ; Wed, 25 Mar 2026 00:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fgStY1YRQz3PZw for ; Wed, 25 Mar 2026 00:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774399669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et8UYMXoFVBWyePljmGoIrJrtTSitRq3Fy6Z3vlUxFg=; b=EZFHlhwa/hVkpNKQk/TaNkl/s8ohnehw36+sz4G9V92Yhl1Qevkgf5sJasfdKJ/xFEKKFl PD19V3YtnKxd/eCc/RIZtoZOy/IHPss4fxr6Qm9LBofz5/tuRTrItVavOT/xZ2cyugGmHn rizvLNz0wFcxRjYtiX967FvbfaIFePImvI04oktbhUbbAOWfyuST84952tviVUC9uXx0BH r5maG3C3o9Xpeqryi4AFrYebFK2i6RMuVj7hMRB58VHN5+d7SKb8Wv1R3LP670KF6AcRv8 EOreX+3OEIR1uyE8bRTZCWq7UCms9qxMcRnOCPINXpGzDX+08D1eZkRu2Ek+2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774399669; a=rsa-sha256; cv=none; b=TF4nsrv5fK1EPgnhDl2ahlqpvgNvbEndhpKIpT/qU3nHgrDq1BQzBVIqUm7g3eMHapGy42 W7GdHGBghMIpqxDuWfeoTkKnA8/L2eDqKFGOQPH0RINiArXVA+v62XFR13BOmZQ3OrftlB /d142IUi0nQtrKT7QLSjUOGX2l34EihrrufZdgyeUBAc/BFZEsn5GZ9Qh+bRv3SpODEc2D xtFBV2yn/PaXJg1qTFkuuZnDUAHFCTU2qBxGPHahnPtL82oyBHbmC1BNo51e7o+2EBox5b Q7gVYkXtLygSjbqWyMeZXrukNecr6E3Tt1T1mwePjGmLe+d4kz/0KJVyV74TbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774399669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et8UYMXoFVBWyePljmGoIrJrtTSitRq3Fy6Z3vlUxFg=; b=I+VMkBpU01LtmittHtuCPGUUpMmhCPaum/Qu4JpNj3aU8msq06U6+L37oRqDcz8ESgeaCr Bz9hcegreSpbZuE7JtS2D11ABF45qvefg8J7n4hVEbvvaYwyHMW/Jo2yR7C2p53pfYsUrX NY2f01FAr6m91aTe9m9iZ5clAuSDm4bfeJ39sX+gcj1KCzJXfrI0FJvZylThfOMMjQRFZo 0XLGIEeHbuIuN0W+5TpeC+OraddRQnyh0VIHbBqwQZnwVd5LizAYs1Yavsr2Ux01Yuix7a byRx9Nl9V5RJkCrKFqeyo4jx611NqQLJsnUlaC1HB/I4ArGQLwJEUlHviky3XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fgStY1798zjjH for ; Wed, 25 Mar 2026 00:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d49b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Mar 2026 00:47:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: f5b8309b9f63 - stable/14 - realpath: Improve manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f5b8309b9f634f1ca0aaeb69823470db93048208 Auto-Submitted: auto-generated Date: Wed, 25 Mar 2026 00:47:49 +0000 Message-Id: <69c330b5.3d49b.3af11c40@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b8309b9f634f1ca0aaeb69823470db93048208 commit f5b8309b9f634f1ca0aaeb69823470db93048208 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-19 01:26:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-25 00:47:45 +0000 realpath: Improve manual page * Try to make the RETURN VALUES section flow better. * Add basename(3), dirname(3), free(3) to the SEE ALSO section. * Drop the CAVEATS section, which was obsolete the moment realpath(3) was added to the Single Unix Specification in 1994. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D55928 (cherry picked from commit 1aecb32021ce46d812db36b9037cdc6f423575f9) --- lib/libc/stdlib/realpath.3 | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3 index 28381b00bbc7..ec2617454a24 100644 --- a/lib/libc/stdlib/realpath.3 +++ b/lib/libc/stdlib/realpath.3 @@ -30,7 +30,7 @@ .\" .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94 .\" -.Dd October 10, 2025 +.Dd March 18, 2026 .Dt REALPATH 3 .Os .Sh NAME @@ -77,27 +77,24 @@ must exist when 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 @@ -109,6 +106,9 @@ for any of the errors specified for the library functions and .Xr getcwd 3 . .Sh SEE ALSO +.Xr basename 3 , +.Xr dirname 3 , +.Xr free 3 , .Xr getcwd 3 .Sh STANDARDS The @@ -120,15 +120,3 @@ The .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 .