CONTRIBUTING.d/patches: Please provide a git-range-diff(1)
[man-pages.git] / man5 / proc_pid_comm.5
blob80c544fa3ccf269e5cdd50744e385f6c997c2264
1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_pid_comm 5 (date) "Linux man-pages (unreleased)"
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
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)