[New-bugs-announce] [issue18006] Set thread nema in linux kernel

Марк Коренберг report at bugs.python.org
Sat May 18 13:44:07 CEST 2013

New submission from Марк Коренберг:

In linux (Since 2.6.9) we can use syscall

prctl(PR_SET_NAME, "Some thread name")

to set thread name to the kernel. This thread is seen  under this name in some process tool (like top, ps, pstree (have bug reported connected with this) and others).

It will be nice if this syscall will be called (from correspoding thread=TID) when changing (setting) thread name.

Note, that in current implementation name will be truncated to 15 bytes in kernel.

This work very well using ctypes or python-prctl module.

Also there is error in manpage about prctl saying that name is set to process (already sent to maintainer). Really, name is set to each thread.

components: Library (Lib)
messages: 189507
nosy: mmarkk
priority: normal
severity: normal
status: open
title: Set thread nema in linux kernel
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list