]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: handle return value from read(2) 32192/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 11 Dec 2019 20:06:14 +0000 (12:06 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 11 Dec 2019 20:06:14 +0000 (12:06 -0800)
Fixes: https://tracker.ceph.com/issues/43266
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/admin_socket.cc

index 6ef57ecf644cac6015f1be89e140e820ce7b2683..4a21311ad106fe5649666746c3f630b09a333d5e 100644 (file)
@@ -256,7 +256,12 @@ void AdminSocket::entry() noexcept
     if (fds[1].revents & POLLIN) {
       // read off one byte
       char buf;
-      ::read(m_wakeup_rd_fd, &buf, 1);
+      auto s = ::read(m_wakeup_rd_fd, &buf, 1);
+      if (s == -1) {
+        int e = errno;
+        ldout(m_cct, 5) << "AdminSocket: (ignoring) read(2) error: '"
+                       << cpp_strerror(e) << dendl;
+      }
       do_tell_queue();
     }
     if (m_shutdown) {