Debian Codegraph @

upstream/debian-trixie/man5/proc_pid_cwd.5

raw
1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <[email protected]>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <[email protected]>
3 .\" Copyright (C) 2023, Alejandro Colomar <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_pid_cwd 5 2024-05-02 "Linux man-pages 6.9.1"
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; see
34 .BR ptrace (2).
35 .SH SEE ALSO
36 .BR proc (5)