Linux-man Archive on lore.kernel.org
 help / color / 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	[flat|nested] 2+ messages in thread

* Re: [PATCH] proc.5: Inform that comm in /proc/pid/{stat,status} might also be truncated
  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)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-06-19 11:56 UTC (permalink / raw)
  To: Arkadiusz Drabczyk; +Cc: mtk.manpages, linux-man

Hello Arkadiusz,

On 6/17/20 10:51 PM, Arkadiusz Drabczyk wrote:
> 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>

Thanks. Patch applied.

Cheers,

Michael

> ---
>  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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

end of thread, back to index

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)

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git