summaryrefslogtreecommitdiffstats
path: root/man/man5/proc_pid_comm.5
blob: f936ed65b8d76316e6ab1d4dcbdc0803cca38914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.TH proc_pid_comm 5 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
/proc/pid/comm \- command name
.SH DESCRIPTION
.TP
.IR /proc/ pid /comm " (since Linux 2.6.33)"
.\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
This file exposes the process's
.I comm
value\[em]that 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 (including the terminating null byte) are silently truncated.
.IP
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.
The value in this file is used for the
.I %e
specifier in
.IR /proc/sys/kernel/core_pattern ;
see
.BR core (5).
.SH SEE ALSO
.BR proc (5)