diff --git a/man5/proc.5 b/man5/proc.5 index 89a7c09ad..7f8031adb 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -477,7 +477,9 @@ check; see .BR ptrace (2). .TP .I /proc/[pid]/environ -This file contains the initial environment for the process. +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\\0\(aq), and there may be a null byte at the end. Thus, to print out the environment of process 1, you would do: @@ -488,13 +490,17 @@ Thus, to print out the environment of process 1, you would do: .fi .in -Once a process starts modifying its environment +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 not be kept up to date. +this file will +.I not +reflect those changes. Further, a process may change the memory this points to by calling .BR prctl (2)