Merge pull request #105 from zlrs/fix/limit_thread_name_lenth_to_16

fix: limit thread name length to 16bytes
This commit is contained in:
Manos 2022-11-30 12:31:19 +00:00 committed by GitHub
commit 0c6dfd0818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -323,8 +323,8 @@ static void thread_hold(int sig_id) {
static void* thread_do(struct thread* thread_p){
/* Set thread name for profiling and debuging */
char thread_name[32] = {0};
snprintf(thread_name, 32, "thread-pool-%d", thread_p->id);
char thread_name[16] = {0};
snprintf(thread_name, 16, "thpool-%d", thread_p->id);
#if defined(__linux__)
/* Use prctl instead to prevent using _GNU_SOURCE flag and implicit declaration */