There are a number telemetry threads which are created and
there is nothing that does pthread_join() to wait for them.
Mark these threads as detached, so that the pthread library
can cleanup state when the thread exits.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ciara Power <ciara.power@intel.com>
pthread_setaffinity_np(t_old, sizeof(*thread_cpuset), thread_cpuset);
set_thread_name(t_old, "telemetry-v1");
TMTY_LOG(DEBUG, "Legacy telemetry socket initialized ok\n");
+ pthread_detach(t_old);
return 0;
}
}
pthread_setaffinity_np(t_new, sizeof(*thread_cpuset), thread_cpuset);
set_thread_name(t_new, "telemetry-v2");
+ pthread_detach(t_new);
atexit(unlink_sockets);
return 0;
close(fd);
return -1;
}
+ pthread_detach(th);
#endif /* !RTE_EXEC_ENV_WINDOWS */
return 0;
}