blob: 027176b5ed76973c7fec8adb03240a5f9733a938 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
.\" 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_cwd 5 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
/proc/pid/cwd \- symbolic link to current working directory
.SH DESCRIPTION
.TP
.IR /proc/ pid /cwd
This is a symbolic link to the current working directory of the process.
To find out the current working directory of process 20,
for instance, you can do this:
.IP
.in +4n
.EX
.RB "$" " cd /proc/20/cwd; pwd \-P"
.EE
.in
.IP
.\" 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).
.SH SEE ALSO
.BR proc (5)
|