From 7137cffd8b8fc6a38014f88d670ed934fb8c2b94 Mon Sep 17 00:00:00 2001 From: Shijin Kong Date: Tue, 8 Dec 2015 15:29:19 -0800 Subject: [PATCH] notification queue read -> readNoInt Summary: EINTR should be retried Reviewed By: afrind Differential Revision: D2735879 fb-gh-sync-id: 6f25cd26e29ab8e7e13a3d63f24bf2d104c14809 --- folly/io/async/NotificationQueue.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/folly/io/async/NotificationQueue.h b/folly/io/async/NotificationQueue.h index 9eee132b..4c2a3154 100644 --- a/folly/io/async/NotificationQueue.h +++ b/folly/io/async/NotificationQueue.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -502,10 +503,10 @@ class NotificationQueue { uint64_t value = 0; ssize_t rc = -1; if (eventfd_ >= 0) { - rc = ::read(eventfd_, &value, sizeof(value)); + rc = readNoInt(eventfd_, &value, sizeof(value)); } else { uint8_t value8; - rc = ::read(pipeFds_[0], &value8, sizeof(value8)); + rc = readNoInt(pipeFds_[0], &value8, sizeof(value8)); value = value8; } if (rc < 0) { -- 2.34.1