From nobody Wed Mar 25 00:46:59 2026 X-Original-To: dev-commits-src-branches@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 4fgSsb4SzZz6WSLy for ; Wed, 25 Mar 2026 00:46:59 +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 4fgSsb21ndz3NV0 for ; Wed, 25 Mar 2026 00:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774399619; 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=/Brt2D0zyjmkuLWAMJ9UIGo5K6IaBNdwCT51CNzOm98=; b=dKiUBXU+R2iH4PQD0pUpE1UxXYS8CbsTVTimgeLRh7stqwpatBN1fRYBlJH3g1G9H+Wr0t CRrnw5YEz0Zjv0AZDZ0HHdnAHpm2k4LuSpSSSMmUe+T9E9j/YsG0C17FJTUyfxNoHrhRtF /hY5RcHk2Ol/x/KYVdjuM1+x6Rb58rSYaljUbMXiE7ZCTwq3pi+oOgi5RqPO1XvbB0+u4U 8Wb6yts+z5LunnYeqx3yEMVJ8rCCXom1KBxCwTnC+brPXmuEnRpMfNIyFSF0lYOUpRR6xl sGuo2FlWIZxLOi6J39WgFRmyl9Sj70BSbvZruV1bWIS6laYnCDEDlPM9qYl92A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774399619; a=rsa-sha256; cv=none; b=iWPTFK0nu0aNngBHeewK1kzPpMtZ+BkQ9L3K4eMZskWul+zDkXpRrtCI+85F6CxD49//ow hyk43rLRNTG7caeW3ZNxOiE6xU6kk9wypg9f1yLlYyM/PLDnfsC6V/+QFCBx5RAsEkzo4S MMw8VRC43aD38zRtcCHRtDzBC69k5ZV2s4SlpRO91TfriE+dVs5OqyUnkPmVE2OFBk5q9A b8mr0d+gnC48sHmRcPibUPhIpbp6xBypG8+bjscE3BkRxFSoLfGT00chAOwo9sE0iGAsfh RGo+O1l60xebL3cFX65jN07OZ9KEVz8WUSsRXApEveNuTU32rIhTs1WlUj2jDQ== 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=1774399619; 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=/Brt2D0zyjmkuLWAMJ9UIGo5K6IaBNdwCT51CNzOm98=; b=oauqtGaM5va1sZi054M8hP3NlHcvDeMHSJkg4KeTXzGavczpJMx5uXP/jU0/rT9LUjPWOm JhoYCSz5tzWYm0XeOPe1c/mCUmctQnD1+Iu+6mOZy+QZkzvbqSlbNu3Hx0dBfvDn/3iIUj IZM9rpXxqHi1pml6XLufv9V63Zfxqx8IMfpuSqs5n07N7OEr3Gz/K6Tz1t4Q8fP4gAHkZb 2gZCsrriJFwNUUoW54ubMNOqn0QQMG/stzx0mM6o/falf549czs22M/MEiLSpW1co81tvH YEJ/Gwus0c2PNDfGplvTj39hz36klbVPaVZygPkFxeJ0DyhB8y2fPJ6QCGCgwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fgSsb0wjtzjb8 for ; Wed, 25 Mar 2026 00:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cdf3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Mar 2026 00:46:59 +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: 8e987f8e810d - stable/15 - realpath: Improve manual page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/15 X-Git-Reftype: branch X-Git-Commit: 8e987f8e810de536e86159be803c33c6e44235ee Auto-Submitted: auto-generated Date: Wed, 25 Mar 2026 00:46:59 +0000 Message-Id: <69c33083.3cdf3.222293bc@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8e987f8e810de536e86159be803c33c6e44235ee commit 8e987f8e810de536e86159be803c33c6e44235ee Author: Dag-Erling Smørgrav AuthorDate: 2026-03-19 01:26:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-25 00:46:44 +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 76f40249963b..a17ddee0b2f1 100644 --- 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 @@ 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 @@ -107,6 +104,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 @@ -118,15 +118,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 .