Clean-up: use lttng_read() wrapper instead of read()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 8 May 2017 15:09:41 +0000 (11:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 8 May 2017 15:09:41 +0000 (11:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/notification-thread-events.c

index 8bc020f960f24f691c6e0a44e51aaac6239084c7..e20c476f830342612721dfb0f5d93c9474b80e08 100644 (file)
@@ -1949,9 +1949,7 @@ int handle_notification_thread_channel_sample(
         * The monitoring pipe only holds messages smaller than PIPE_BUF,
         * ensuring that read/write of sampling messages are atomic.
         */
-       do {
-               ret = read(pipe, &sample_msg, sizeof(sample_msg));
-       } while (ret == -1 && errno == EINTR);
+       ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg));
        if (ret != sizeof(sample_msg)) {
                ERR("[notification-thread] Failed to read from monitoring pipe (fd = %i)",
                                pipe);
This page took 0.03223 seconds and 4 git commands to generate.