- do {
- /* Get socket from dispatch thread. */
- ret = read(ht_cleanup_pipe[0], &ht, sizeof(ht));
- } while (ret < 0 && errno == EINTR);
- if (ret < 0 || ret < sizeof(ht)) {
+ /* Get socket from dispatch thread. */
+ size_ret = lttng_read(ht_cleanup_pipe[0], &ht,
+ sizeof(ht));
+ if (size_ret < sizeof(ht)) {