chiark / gitweb /
process-util: allow rename_process() only in the main thread
authorLennart Poettering <lennart@poettering.net>
Sun, 24 Dec 2017 17:48:49 +0000 (18:48 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:45 +0000 (07:49 +0200)
commit30a3ebbb0b6094fca91baa056d1904a564c5d981
treed3b3fc8b4a486d227fb078cb598596239bb5fae6
parenta09384dde54cbb644b3c414ba8dec15112497cab
process-util: allow rename_process() only in the main thread

We make assumptions about the comm name we set via PR_SET_NAME: that it
would reflect the process name, but that's only the case for the main
thread. Moreover, we cache the mmap() region without locking.

Let's hence be safe rather than sorry and support all this only in the
main thread.
src/basic/process-util.c