From nobody Thu Mar 19 01:26:54 2026 X-Original-To: dev-commits-src-main@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 4fbp2Q717bz6VRn1 for ; Thu, 19 Mar 2026 01:26:54 +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 4fbp2Q6F4Wz43Zj for ; Thu, 19 Mar 2026 01:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773883614; 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=EJUhrue7fwAT1Jfxw1oVhXbOyz0RCH3SC7mkjoHpGNU=; b=gW1K7Zf49s5L9tp5hjwtrVnBVNrSqd9U3psyKz9Uf8gr89GHxak/PyHrzzQdNa57hbScE7 gJ5Bxe4NSPnFJDA9zYUwSp0g/vuk7KI/zopa9sIlQx+Qk35gnQihtV4nU1V/gvbDwFWYli jBqzM7nBstw5ZWpzKHdE48/VHue5fs2rAPfd7qpe/pooGe7SbG4aESt4UuR/vSOo7HyOJ8 0Bg4lwzyEbaN3yPYMQfntPa+LjAUXLgJrq+rqF1TOySkXnNOGp9izeVF+rd3xCRbGKJbPa FJ75LsrCrcPQ3k6G6ECd2d4PJm9gsI1JXctWOhRwy4dRYLAd7e8gZJN2jfdW1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773883614; a=rsa-sha256; cv=none; b=x4/uwemmVAQTTA4H+R2YBaNpnIPp3GbfSfSVRP1UXJMBSSuYjb7wHa/Q2x5wPT4zfK3Znr UGGe7pDkrQsThI9GG+CY6v+yafqUiDLocIIktDb9oMFoRQoVD0CBe2VpRpEDQgy1gKUvBE e46ksnpc0KcQleKvlqxVoT+CZD9BeSCjDBkHDuxFX24V9chWjeVkJv8gxDjeyDMj5OnI5E xqAnB7XeWfJ3vot850Yrm9lvi8YkvkAnp+q6ST9aDD23P3+cLc9NHLDDI6ctlpV1Yscv4d 4fvrVOjNzcoSlvCLKXmD/cuAuhw5ShLynL3KIAD7C/ffn9xpbQqKGBQXo9zMUQ== 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=1773883614; 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=EJUhrue7fwAT1Jfxw1oVhXbOyz0RCH3SC7mkjoHpGNU=; b=IAnYDMid89sdKHf4m3bnsXNY4bogMvE54B4ftpIN4okughuYGPJ7c2kVyXep6sQIAkvrYE T21caDuGZNHjCqSY9ChyRDu167arrfLEBIlbEOllIdd1DR2LLyuU6u4FfvmgJQiCdk1fg7 0oI336V8YSpah7idOyhI90TJmX1F6c+CBFPxpB3kxirnnYCLc/g5YLkAnazKko+jMronsd xiwmcKcpRMdaA5KzqoPkaMmY0ZVHnNc8M2nTOrrPeXQRtgd6TPEXP7HKvKXlTPH+u6DqEe Ph5QSdcT0jRRHDtvWp22PbEE2rCEyfB4z8nXkX5pUSiJaeSW1+Y0y4BbP92AuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fbp2Q5mzKzZsh for ; Thu, 19 Mar 2026 01:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e2bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 19 Mar 2026 01:26:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 1aecb32021ce - main - realpath: Improve manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1aecb32021ce46d812db36b9037cdc6f423575f9 Auto-Submitted: auto-generated Date: Thu, 19 Mar 2026 01:26:54 +0000 Message-Id: <69bb50de.3e2bc.1ec71264@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1aecb32021ce46d812db36b9037cdc6f423575f9 commit 1aecb32021ce46d812db36b9037cdc6f423575f9 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-19 01:26:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-19 01:26:34 +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 --- 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 .