mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-09 10:00:54 +00:00
11 lines
255 B
C++
11 lines
255 B
C++
|
#include <sys/prctl.h>
|
||
|
#include <DB/Core/Exception.h>
|
||
|
#include <DB/Common/setThreadName.h>
|
||
|
|
||
|
|
||
|
void setThreadName(const char * name)
|
||
|
{
|
||
|
if (0 != prctl(PR_SET_NAME, name, 0, 0, 0))
|
||
|
DB::throwFromErrno("Cannot set thread name with prctl(PR_SET_NAME...)");
|
||
|
}
|