diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-08-14 14:55:48 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-08-15 23:07:08 +0200 |
| commit | 5c6384adb15d9295007ee97f88f739f520c69a62 (patch) | |
| tree | 602374de9ad8a4f872ce5d2fb4517c8cfaa8c6d7 | |
| parent | 4baf27909cbe5088b0ca6de047532b4be6035bfb (diff) | |
| download | man-pages-5c6384adb15d9295007ee97f88f739f520c69a62.tar.gz | |
proc.5, proc_pid_cwd.5: Split /proc/PID/cwd from proc(5)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man5/proc.5 | 24 | ||||
| -rw-r--r-- | man5/proc_pid_cwd.5 | 36 |
2 files changed, 36 insertions, 24 deletions
diff --git a/man5/proc.5 b/man5/proc.5 index 1acb5edabb..c5182fb6d0 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -267,30 +267,6 @@ Therefore, it may be desirable to reset the "dumpable" attribute .I after making any desired changes to the process's effective UID or GID. .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). -.TP .IR /proc/ pid /environ This file contains the initial environment that was set when the currently executing program was started via diff --git a/man5/proc_pid_cwd.5 b/man5/proc_pid_cwd.5 new file mode 100644 index 0000000000..3accb92376 --- /dev/null +++ b/man5/proc_pid_cwd.5 @@ -0,0 +1,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 (date) "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) |
