| Index: tools/android/forwarder2/pipe_notifier.cc
|
| diff --git a/tools/android/forwarder2/pipe_notifier.cc b/tools/android/forwarder2/pipe_notifier.cc
|
| index 9110fffcea1812dd1df8a648a1556fb408af4478..94c13541bbe852791e791e3543fb2469217a3eaa 100644
|
| --- a/tools/android/forwarder2/pipe_notifier.cc
|
| +++ b/tools/android/forwarder2/pipe_notifier.cc
|
| @@ -34,10 +34,21 @@ bool PipeNotifier::Notify() {
|
| errno = 0;
|
| int ret = HANDLE_EINTR(write(sender_fd_, "1", 1));
|
| if (ret < 0) {
|
| - LOG(WARNING) << "Error while notifying pipe. " << safe_strerror(errno);
|
| + PLOG(ERROR) << "write";
|
| return false;
|
| }
|
| return true;
|
| }
|
|
|
| +void PipeNotifier::Reset() {
|
| + char buffer[1];
|
| + int ret = HANDLE_EINTR(read(receiver_fd_, buffer, sizeof(buffer)));
|
| + if (ret < 0) {
|
| + PLOG(ERROR) << "read";
|
| + return;
|
| + }
|
| + DCHECK_EQ(1, ret);
|
| + DCHECK_EQ('1', buffer[0]);
|
| +}
|
| +
|
| } // namespace forwarder
|
|
|