Commit bfeb9d10 authored by Brian Geffon's avatar Brian Geffon Committed by Commit Bot

[base] CROS MemoryPressureMonitor may not wake on shutdown.

The kernel may not bubble up the close always if you don't
specify POLLIN.

BUG=chromium:964569
TESTED=tested on dev device

Change-Id: I21f54edf12a4dbec1d2b3ba5fef6c78410457338
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715898Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Brian Geffon <bgeffon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681067}
parent 14d3a4a1
...@@ -93,7 +93,7 @@ bool WaitForMemoryPressureChanges(int available_fd) { ...@@ -93,7 +93,7 @@ bool WaitForMemoryPressureChanges(int available_fd) {
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::WILL_BLOCK); base::BlockingType::WILL_BLOCK);
pollfd pfd = {available_fd, POLLPRI | POLLERR, 0}; pollfd pfd = {available_fd, POLLPRI | POLLERR | POLLIN, 0};
int res = HANDLE_EINTR(poll(&pfd, 1, -1)); // Wait indefinitely. int res = HANDLE_EINTR(poll(&pfd, 1, -1)); // Wait indefinitely.
PCHECK(res != -1); PCHECK(res != -1);
......
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