]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Bugfix: set thread name will fail, when running as differnt user. 7845/head
authorIgor Podoski <igor.podoski@ts.fujitsu.com>
Mon, 29 Feb 2016 12:05:29 +0000 (13:05 +0100)
committerIgor Podoski <igor.podoski@ts.fujitsu.com>
Mon, 29 Feb 2016 12:05:29 +0000 (13:05 +0100)
commitf22a09705d6b8b00ca0246f0bf9094616fc4448c
tree111c455a883371469e6d583a8a1add7f9aaa01ad
parent67b6e4a5f7e4ed0d10bf74f9927f065b1e90c465
Bugfix: set thread name will fail, when running as differnt user.

When using setuid/setgid, main thread don't have access to
/proc/self/task/[tid]/comm, which is owned by newly created
thread (root).

To fix this, pthread_setname_np() was moved to newly created
thread, and now it changes name for itself.

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
src/common/Thread.cc
src/common/Thread.h