mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
fix
This commit is contained in:
parent
380a472a8d
commit
fe45a62c34
@ -40,11 +40,11 @@ std::string getThreadName()
|
||||
std::string name(16, '\0');
|
||||
|
||||
#if defined(__APPLE__)
|
||||
if (pthread_getname_np(pthread_self(), name.data(), name.size()));
|
||||
if (pthread_getname_np(pthread_self(), name.data(), name.size()))
|
||||
throw DB::Exception("Cannot get thread name with pthread_getname_np()", DB::ErrorCodes::PTHREAD_ERROR);
|
||||
#elif defined(__FreeBSD__)
|
||||
// TODO: make test. freebsd will have this function soon https://freshbsd.org/commit/freebsd/r337983
|
||||
// if (pthread_get_name_np(pthread_self(), name.data(), name.size()));
|
||||
// if (pthread_get_name_np(pthread_self(), name.data(), name.size()))
|
||||
// throw DB::Exception("Cannot get thread name with pthread_get_name_np()", DB::ErrorCodes::PTHREAD_ERROR);
|
||||
#else
|
||||
if (0 != prctl(PR_GET_NAME, name.data(), 0, 0, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user