linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org
Subject: [PATCH] proc.5: Inform that comm in /proc/pid/{stat,status} might also be truncated
Date: Wed, 17 Jun 2020 22:51:25 +0200	[thread overview]
Message-ID: <20200617205125.28163-1-arkadiusz@drabczyk.org> (raw)

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


             reply	other threads:[~2020-06-17 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 20:51 Arkadiusz Drabczyk [this message]
2020-06-19 11:56 ` [PATCH] proc.5: Inform that comm in /proc/pid/{stat,status} might also be truncated Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617205125.28163-1-arkadiusz@drabczyk.org \
    --to=arkadiusz@drabczyk.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).