]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc_pid_exe.5
proc_sys.5, proc_sys_vm.5: Split /proc/sys/vm/ from proc_sys(5)
[thirdparty/man-pages.git] / man5 / proc_pid_exe.5
CommitLineData
86616579
AC
1.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
4.\"
5.\" SPDX-License-Identifier: GPL-3.0-or-later
6.\"
7.TH proc_pid_exe 5 (date) "Linux man-pages (unreleased)"
8.SH NAME
9/proc/pid/exe \- symbolic link to program pathname
10.SH DESCRIPTION
11.TP
12.IR /proc/ pid /exe
13Under Linux 2.2 and later, this file is a symbolic link
14containing the actual pathname of the executed command.
15This symbolic link can be dereferenced normally; attempting to open
16it will open the executable.
17You can even type
18.IR /proc/ pid /exe
19to run another copy of the same executable that is being run by
20process
21.IR pid .
22If the pathname has been unlinked, the symbolic link will contain the
23string \[aq]\ (deleted)\[aq] appended to the original pathname.
24.\" The following was still true as at kernel 2.6.13
25In a multithreaded process, the contents of this symbolic link
26are not available if the main thread has already terminated
27(typically by calling
28.BR pthread_exit (3)).
29.IP
30Permission to dereference or read
31.RB ( readlink (2))
32this symbolic link is governed by a ptrace access mode
33.B PTRACE_MODE_READ_FSCREDS
34check; see
35.BR ptrace (2).
36.IP
37Under Linux 2.0 and earlier,
38.IR /proc/ pid /exe
39is a pointer to the binary which was executed,
40and appears as a symbolic link.
41A
42.BR readlink (2)
43call on this file under Linux 2.0 returns a string in the format:
44.IP
45.in +4n
46.EX
47[device]:inode
48.EE
49.in
50.IP
51For example, [0301]:1502 would be inode 1502 on device major 03 (IDE,
52MFM, etc. drives) minor 01 (first partition on the first drive).
53.IP
54.BR find (1)
55with the
56.I \-inum
57option can be used to locate the file.
58.SH SEE ALSO
59.BR proc (5)