linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] proc.5: Inform that comm in /proc/pid/{stat,status} might also be truncated
@ 2020-06-17 20:51 Arkadiusz Drabczyk
  2020-06-19 11:56 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Arkadiusz Drabczyk @ 2020-06-17 20:51 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man

pgrep for example searches for a process name in /proc/pid/status and
therefore cannot find processes whose names are longer than 15
characters unless -f is specified.

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
---
 man5/proc.5 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/man5/proc.5 b/man5/proc.5
index 538c6c6..edaf281 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -2089,6 +2089,9 @@ The process ID.
 .TP
 (2) \fIcomm\fP \ %s
 The filename of the executable, in parentheses.
+Strings longer than
+.B TASK_COMM_LEN
+(16) characters (including the terminating null byte) are silently truncated.
 This is visible whether or not the executable is swapped out.
 .TP
 (3) \fIstate\fP \ %c
@@ -2504,6 +2507,9 @@ The fields are as follows:
 .IP * 2
 .IR Name :
 Command run by this process.
+Strings longer than
+.B TASK_COMM_LEN
+(16) characters (including the terminating null byte) are silently truncated.
 .IP *
 .IR Umask :
 Process umask, expressed in octal with a leading zero; see
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-19 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 20:51 [PATCH] proc.5: Inform that comm in /proc/pid/{stat,status} might also be truncated Arkadiusz Drabczyk
2020-06-19 11:56 ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).