The manpage says: FILES /compat/linux/proc/pid A directory containing process information for process pid. /compat/linux/proc/self A directory containing process information for the current process. * There is no "pid" directory, the 'pid' term should be denoted as a placeholder for the real PID. * There is no "self" directory, "self" is a symlink to a PID directory The manpage on RHEL 8 says: /proc/[pid] There is a numerical subdirectory for each running process; the subdirectory is named by the process ID. but as bad as: /proc/self This directory refers to the process accessing the /proc filesystem, and is identical to the /proc directory named by the process ID of the same process. Both definitions confuse users.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0d31189cbce4de142a43b65037beb7bf8c09cf26 commit 0d31189cbce4de142a43b65037beb7bf8c09cf26 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2025-12-24 18:12:25 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2025-12-26 18:53:43 +0000 linprocfs.4: Improve docs around pid/self entries Mark <pid> as a placeholder and document that self is a symlink to a directory. PR: 283080 Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54358 share/man/man4/linprocfs.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ad6381a6ebf434a6e84a4b1862f6538a763e1ea3 commit ad6381a6ebf434a6e84a4b1862f6538a763e1ea3 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2025-12-24 18:12:25 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2025-12-29 18:35:32 +0000 linprocfs.4: Improve docs around pid/self entries Mark <pid> as a placeholder and document that self is a symlink to a directory. PR: 283080 Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54358 (cherry picked from commit 0d31189cbce4de142a43b65037beb7bf8c09cf26) share/man/man4/linprocfs.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)