X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-thread.c;h=0248d7a0aa305a17cfba12cb8ceb60deb2266472;hp=85803e472217901a50eeec10e6ace02c3c426ca1;hb=6cd525e813795a1d5e38feac8dedf2c73ffb1274;hpb=33b141366b29aa086ecb8d06808d7ba91f83cb1e diff --git a/src/bin/lttng-sessiond/ust-thread.c b/src/bin/lttng-sessiond/ust-thread.c index 85803e472..0248d7a0a 100644 --- a/src/bin/lttng-sessiond/ust-thread.c +++ b/src/bin/lttng-sessiond/ust-thread.c @@ -31,6 +31,7 @@ void *ust_thread_manage_notify(void *data) { int i, ret, pollfd, err = -1; + ssize_t size_ret; uint32_t revents, nb_fd; struct lttng_poll_event events; @@ -105,11 +106,10 @@ restart: goto error; } - 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)) { PERROR("read apps notify pipe"); goto error; }