diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-08-14 14:59:20 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-08-15 23:07:09 +0200 |
| commit | 49ae79265edc29eddaab9958920f57119326dbef (patch) | |
| tree | bc482db86ebaa394cc9798687c79c822af0685c2 | |
| parent | 5c6384adb15d9295007ee97f88f739f520c69a62 (diff) | |
| download | man-pages-49ae79265edc29eddaab9958920f57119326dbef.tar.gz | |
proc.5, proc_pid_environ.5: Split /proc/PID/environ from proc(5)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man5/proc.5 | 36 | ||||
| -rw-r--r-- | man5/proc_pid_environ.5 | 48 |
2 files changed, 48 insertions, 36 deletions
diff --git a/man5/proc.5 b/man5/proc.5 index c5182fb6d0..ac0ada12a8 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -267,42 +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 /environ -This file contains the initial environment that was set -when the currently executing program was started via -.BR execve (2). -The entries are separated by null bytes (\[aq]\e0\[aq]), -and there may be a null byte at the end. -Thus, to print out the environment of process 1, you would do: -.IP -.in +4n -.EX -.RB "$" " cat /proc/1/environ | tr \[aq]\e000\[aq] \[aq]\en\[aq]" -.EE -.in -.IP -If, after an -.BR execve (2), -the process modifies its environment -(e.g., by calling functions such as -.BR putenv (3) -or modifying the -.BR environ (7) -variable directly), -this file will -.I not -reflect those changes. -.IP -Furthermore, a process may change the memory location that this file refers via -.BR prctl (2) -operations such as -.BR PR_SET_MM_ENV_START . -.IP -Permission to access this file is governed by a ptrace access mode -.B PTRACE_MODE_READ_FSCREDS -check; see -.BR ptrace (2). -.TP .IR /proc/ pid /exe Under Linux 2.2 and later, this file is a symbolic link containing the actual pathname of the executed command. diff --git a/man5/proc_pid_environ.5 b/man5/proc_pid_environ.5 new file mode 100644 index 0000000000..0ff8d48294 --- /dev/null +++ b/man5/proc_pid_environ.5 @@ -0,0 +1,48 @@ +.\" 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_environ 5 (date) "Linux man-pages (unreleased)" +.SH NAME +/proc/pid/environ \- initial environment +.SH DESCRIPTION +.TP +.IR /proc/ pid /environ +This file contains the initial environment that was set +when the currently executing program was started via +.BR execve (2). +The entries are separated by null bytes (\[aq]\e0\[aq]), +and there may be a null byte at the end. +Thus, to print out the environment of process 1, you would do: +.IP +.in +4n +.EX +.RB "$" " cat /proc/1/environ | tr \[aq]\e000\[aq] \[aq]\en\[aq]" +.EE +.in +.IP +If, after an +.BR execve (2), +the process modifies its environment +(e.g., by calling functions such as +.BR putenv (3) +or modifying the +.BR environ (7) +variable directly), +this file will +.I not +reflect those changes. +.IP +Furthermore, a process may change the memory location that this file refers via +.BR prctl (2) +operations such as +.BR PR_SET_MM_ENV_START . +.IP +Permission to access this file is governed by a ptrace access mode +.B PTRACE_MODE_READ_FSCREDS +check; see +.BR ptrace (2). +.SH SEE ALSO +.BR proc (5) |
