Commit 7137cffd authored by Shijin Kong's avatar Shijin Kong Committed by facebook-github-bot-4

notification queue read -> readNoInt

Summary: EINTR should be retried

Reviewed By: afrind

Differential Revision: D2735879

fb-gh-sync-id: 6f25cd26e29ab8e7e13a3d63f24bf2d104c14809
parent 750d49c8
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <stdexcept> #include <stdexcept>
#include <utility> #include <utility>
#include <folly/FileUtil.h>
#include <folly/io/async/EventBase.h> #include <folly/io/async/EventBase.h>
#include <folly/io/async/EventHandler.h> #include <folly/io/async/EventHandler.h>
#include <folly/io/async/DelayedDestruction.h> #include <folly/io/async/DelayedDestruction.h>
...@@ -502,10 +503,10 @@ class NotificationQueue { ...@@ -502,10 +503,10 @@ class NotificationQueue {
uint64_t value = 0; uint64_t value = 0;
ssize_t rc = -1; ssize_t rc = -1;
if (eventfd_ >= 0) { if (eventfd_ >= 0) {
rc = ::read(eventfd_, &value, sizeof(value)); rc = readNoInt(eventfd_, &value, sizeof(value));
} else { } else {
uint8_t value8; uint8_t value8;
rc = ::read(pipeFds_[0], &value8, sizeof(value8)); rc = readNoInt(pipeFds_[0], &value8, sizeof(value8));
value = value8; value = value8;
} }
if (rc < 0) { if (rc < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment