- return ret;
-
-error_thread:
- utils_close_pipe(ht_cleanup_quit_pipe);
-error_quit_pipe:
- utils_close_pipe(ht_cleanup_pipe);
- return ret;
-}
-
-int fini_ht_cleanup_thread(pthread_t *thread)
-{
- int ret;
-
- ret = notify_thread_pipe(ht_cleanup_quit_pipe[1]);
- if (ret < 0) {
- ERR("write error on ht_cleanup quit pipe");
- goto end;
- }
-
- ret = pthread_join(*thread, NULL);
- if (ret) {
- errno = ret;
- PERROR("pthread_join ht cleanup thread");
- }
- utils_close_pipe(ht_cleanup_pipe);
- utils_close_pipe(ht_cleanup_quit_pipe);
-end:
- return ret;