Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_comm.5

raw
1 .\" Copyright 1994-1995, Daniel Quinlan <[email protected]>
2 .\" Copyright 2002-2017, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_pid_comm 5 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 /proc/pid/comm \- command name
10 .SH DESCRIPTION
11 .TP
12 .IR /proc/ pid /comm " (since Linux 2.6.33)"
13 .\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
14 This file exposes the process's
15 .I comm
16 value\[em]that is, the command name associated with the process.
17 Different threads in the same process may have different
18 .I comm
19 values, accessible via
20 .IR /proc/ pid /task/ tid /comm .
21 A thread may modify its
22 .I comm
23 value, or that of any of other thread in the same thread group (see
24 the discussion of
25 .B CLONE_THREAD
26 in
27 .BR clone (2)),
28 by writing to the file
29 .IR /proc/self/task/ tid /comm .
30 Strings longer than
31 .B TASK_COMM_LEN
32 (16) characters (including the terminating null byte) are silently truncated.
33 .IP
34 This file provides a superset of the
35 .BR prctl (2)
36 .B PR_SET_NAME
37 and
38 .B PR_GET_NAME
39 operations, and is employed by
40 .BR pthread_setname_np (3)
41 when used to rename threads other than the caller.
42 The value in this file is used for the
43 .I %e
44 specifier in
45 .IR /proc/sys/kernel/core_pattern ;
46 see
47 .BR core (5).
48 .SH SEE ALSO
49 .BR proc (5)