From 3d08cd331c1adcf0d917392f7e527b3f00511748 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 24 May 2024 06:52:22 +0200 Subject: Merging upstream version 6.8. Signed-off-by: Daniel Baumann --- man/man5/proc_pid_cwd.5 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 man/man5/proc_pid_cwd.5 (limited to 'man/man5/proc_pid_cwd.5') diff --git a/man/man5/proc_pid_cwd.5 b/man/man5/proc_pid_cwd.5 new file mode 100644 index 0000000..027176b --- /dev/null +++ b/man/man5/proc_pid_cwd.5 @@ -0,0 +1,36 @@ +.\" Copyright (C) 1994, 1995, Daniel Quinlan +.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk +.\" Copyright (C) 2023, Alejandro Colomar +.\" +.\" 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) -- cgit v1.2.3