Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_cwd.5

raw
1 .\" Copyright 1994-1995, Daniel Quinlan <[email protected]>
2 .\" Copyright 2002-2017, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_pid_cwd 5 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 /proc/pid/cwd \- symbolic link to current working directory
10 .SH DESCRIPTION
11 .TP
12 .IR /proc/ pid /cwd
13 This is a symbolic link to the current working directory of the process.
14 To find out the current working directory of process 20,
15 for instance, you can do this:
16 .IP
17 .in +4n
18 .EX
19 .RB "$" " cd /proc/20/cwd; pwd \-P"
20 .EE
21 .in
22 .IP
23 .\" The following was still true as at kernel 2.6.13
24 In a multithreaded process, the contents of this symbolic link
25 are not available if the main thread has already terminated
26 (typically by calling
27 .BR pthread_exit (3)).
28 .IP
29 Permission to dereference or read
30 .RB ( readlink (2))
31 this symbolic link is governed by a ptrace access mode
32 .B PTRACE_MODE_READ_FSCREDS
33 check;
34 see
35 .BR ptrace (2).
36 .SH SEE ALSO
37 .BR proc (5)