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