diff options
-rw-r--r-- | cpp/src/qmf/PosixEventNotifierImpl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qmf/PosixEventNotifierImpl.cpp b/cpp/src/qmf/PosixEventNotifierImpl.cpp index abc9cadcfa..011dbcc214 100644 --- a/cpp/src/qmf/PosixEventNotifierImpl.cpp +++ b/cpp/src/qmf/PosixEventNotifierImpl.cpp @@ -18,9 +18,11 @@ */ #include "PosixEventNotifierImpl.h" +#include "qpid/log/Statement.h" #include <fcntl.h> #include <unistd.h> +#include <errno.h> #define BUFFER_SIZE 10 @@ -51,10 +53,12 @@ void PosixEventNotifierImpl::update(bool readable) char buffer[BUFFER_SIZE]; if(readable && !this->isReadable()) { - (void) ::write(myHandle, "1", 1); + if (::write(myHandle, "1", 1) == -1) + QPID_LOG(error, "PosixEventNotifierImpl::update write failed: " << errno); } else if(!readable && this->isReadable()) { - (void) ::read(yourHandle, buffer, BUFFER_SIZE); + if (::read(yourHandle, buffer, BUFFER_SIZE) == -1) + QPID_LOG(error, "PosixEventNotifierImpl::update read failed: " << errno); } } |