proc.5: Document /proc/PID/comm

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-15 11:22:20 +02:00
parent b3fb99e8d3
commit 32d7ef0088
1 changed files with 31 additions and 4 deletions

View File

@ -217,10 +217,37 @@ 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\\0\(aq),
with a further null byte after the last string.
.\" FIXME /proc/[pid]/comm
.\" Since Linux 2.6.33
.\" Documentation/filesystems/proc.txt
.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
.TP
.IR /proc/[pid]/comm " (since Linux 2.6.33)"
.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
This file exposes the process's
.I comm
value\(emthat is, the command name associated with the process.
Different threads in the same process may have different
.I comm
values, accessible via
.IR /proc/[pid]/task/[tid]/comm .
A thread may modify its
.I comm
value, or that of any of other thread in the same thread group (see
the discussion of
.B CLONE_THREAD
in
.BR clone (2)),
by writing to the file
.IR /proc/self/task/[tid]/comm .
Strings longer than
.B TASK_COMM_LEN
(16) characters are silently truncated.
This file provides a superset of the
.BR prctl (2)
.B PR_SET_NAME
and
.B PR_GET_NAME
operations, and is employed by
.BR pthread_setname_np (3)
when used to rename threads other than the caller.
.TP
.IR /proc/[pid]/coredump_filter " (since kernel 2.6.23)"
See