| 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..02842bd9b7cea1e9829b0a829268fb67990139aa 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 c;
|
| + int ret = HANDLE_EINTR(read(receiver_fd_, &c, 1));
|
| + if (ret < 0) {
|
| + PLOG(ERROR) << "read";
|
| + return;
|
| + }
|
| + DCHECK_EQ(1, ret);
|
| + DCHECK_EQ('1', c);
|
| +}
|
| +
|
| } // namespace forwarder
|
|
|