aboutsummaryrefslogtreecommitdiffstats
path: root/man5
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2020-04-10 07:33:54 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-04-10 10:14:21 +0200
commitee669ccaa7b8fe4f503755a55f7974ced3dd54ff (patch)
tree3a6ee9e4b60ecb6291de27217725d790ba929a98 /man5
parentaf238773923906b68c9f06a17dbe682f2903db75 (diff)
downloadman-pages-ee669ccaa7b8fe4f503755a55f7974ced3dd54ff.tar.gz
proc.5: Clarify /proc/[pid]/cmdline mutability
The cmdline file is a window into memory that is controlled by the target process, and that memory may be changed arbitrarily, as can the window via prctl settings. Make sure people understand that this file is all an illusion. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man5')
-rw-r--r--man5/proc.512
1 files changed, 12 insertions, 0 deletions
diff --git a/man5/proc.5 b/man5/proc.5
index a5dbad7020..dfd9960e97 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -512,6 +512,18 @@ that is, a read on this file will return 0 characters.
The command-line arguments appear in this file as a set of
strings separated by null bytes (\(aq\e0\(aq),
with a further null byte after the last string.
+.IP
+If, after an
+.BR execve (2),
+the process modifies its argv strings, those changes will show up here.
+This is not the same thing as modifying the argv array.
+.IP
+Furthermore, a process may change the memory location that this file refers via
+.BR prctl (2)
+operations such as
+.BR PR_SET_MM_ARG_START .
++.IP
++Think of this file as the command line that the process wants you to see.
.TP
.IR /proc/[pid]/comm " (since Linux 2.6.33)"
.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4