]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
proc.5, proc_pid_exe.5: Split /proc/PID/exe from proc(5)
authorAlejandro Colomar <alx@kernel.org>
Mon, 14 Aug 2023 13:02:41 +0000 (15:02 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 15 Aug 2023 21:07:09 +0000 (23:07 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man5/proc.5
man5/proc_pid_exe.5 [new file with mode: 0644]

index ac0ada12a8d7ae2c55b097cb63927634664f80a2..743993494def5860dc6011c30710081b77571492 100644 (file)
@@ -267,53 +267,6 @@ Therefore, it may be desirable to reset the "dumpable" attribute
 .I after
 making any desired changes to the process's effective UID or GID.
 .TP
-.IR /proc/ pid /exe
-Under Linux 2.2 and later, this file is a symbolic link
-containing the actual pathname of the executed command.
-This symbolic link can be dereferenced normally; attempting to open
-it will open the executable.
-You can even type
-.IR /proc/ pid /exe
-to run another copy of the same executable that is being run by
-process
-.IR pid .
-If the pathname has been unlinked, the symbolic link will contain the
-string \[aq]\ (deleted)\[aq] appended to the original pathname.
-.\" The following was still true as at kernel 2.6.13
-In a multithreaded process, the contents of this symbolic link
-are not available if the main thread has already terminated
-(typically by calling
-.BR pthread_exit (3)).
-.IP
-Permission to dereference or read
-.RB ( readlink (2))
-this symbolic link is governed by a ptrace access mode
-.B PTRACE_MODE_READ_FSCREDS
-check; see
-.BR ptrace (2).
-.IP
-Under Linux 2.0 and earlier,
-.IR /proc/ pid /exe
-is a pointer to the binary which was executed,
-and appears as a symbolic link.
-A
-.BR readlink (2)
-call on this file under Linux 2.0 returns a string in the format:
-.IP
-.in +4n
-.EX
-[device]:inode
-.EE
-.in
-.IP
-For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
-MFM, etc. drives) minor 01 (first partition on the first drive).
-.IP
-.BR find (1)
-with the
-.I \-inum
-option can be used to locate the file.
-.TP
 .IR /proc/ pid /fd/
 This is a subdirectory containing one entry for each file which the
 process has open, named by its file descriptor, and which is a
diff --git a/man5/proc_pid_exe.5 b/man5/proc_pid_exe.5
new file mode 100644 (file)
index 0000000..e308677
--- /dev/null
@@ -0,0 +1,59 @@
+.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
+.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
+.\"
+.\" SPDX-License-Identifier: GPL-3.0-or-later
+.\"
+.TH proc_pid_exe 5 (date) "Linux man-pages (unreleased)"
+.SH NAME
+/proc/pid/exe \- symbolic link to program pathname
+.SH DESCRIPTION
+.TP
+.IR /proc/ pid /exe
+Under Linux 2.2 and later, this file is a symbolic link
+containing the actual pathname of the executed command.
+This symbolic link can be dereferenced normally; attempting to open
+it will open the executable.
+You can even type
+.IR /proc/ pid /exe
+to run another copy of the same executable that is being run by
+process
+.IR pid .
+If the pathname has been unlinked, the symbolic link will contain the
+string \[aq]\ (deleted)\[aq] appended to the original pathname.
+.\" The following was still true as at kernel 2.6.13
+In a multithreaded process, the contents of this symbolic link
+are not available if the main thread has already terminated
+(typically by calling
+.BR pthread_exit (3)).
+.IP
+Permission to dereference or read
+.RB ( readlink (2))
+this symbolic link is governed by a ptrace access mode
+.B PTRACE_MODE_READ_FSCREDS
+check; see
+.BR ptrace (2).
+.IP
+Under Linux 2.0 and earlier,
+.IR /proc/ pid /exe
+is a pointer to the binary which was executed,
+and appears as a symbolic link.
+A
+.BR readlink (2)
+call on this file under Linux 2.0 returns a string in the format:
+.IP
+.in +4n
+.EX
+[device]:inode
+.EE
+.in
+.IP
+For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
+MFM, etc. drives) minor 01 (first partition on the first drive).
+.IP
+.BR find (1)
+with the
+.I \-inum
+option can be used to locate the file.
+.SH SEE ALSO
+.BR proc (5)