From 7c2551ef99cb5b7a927373a198013601ee43fd9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 8 May 2017 11:09:41 -0400 Subject: [PATCH] Clean-up: use lttng_read() wrapper instead of read() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/notification-thread-events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 8bc020f96..e20c476f8 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -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); -- 2.34.1