cef/patch/patches/linux_poll_2466.patch
Marshall Greenblatt 047e8f9349 Update to Chromium version 82.0.4085.0 (#749737)
- Building on macOS now requires the 10.15 SDK. Xcode 11.3 is recommended as
  Xcode 11.4 is not currently supported (see https://crbug.com/1065146).
- Jumbo build configuration is no longer supported.

Chromium is skipping the M82 release and consequently no CEF 4085 branch will
be created. For details on the Chromium decision see
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/JItlSrZxBAAJ
2020-04-02 13:20:25 -04:00

48 lines
1.4 KiB
Diff

diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
index 563e08067585..3200fa658457 100644
--- base/files/file_path_watcher_linux.cc
+++ base/files/file_path_watcher_linux.cc
@@ -5,6 +5,7 @@
#include "base/files/file_path_watcher.h"
#include <errno.h>
+#include <poll.h>
#include <stddef.h>
#include <string.h>
#include <sys/inotify.h>
@@ -13,6 +14,7 @@
#include <unistd.h>
#include <algorithm>
+#include <array>
#include <fstream>
#include <map>
#include <memory>
@@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() {
PlatformThread::SetName("inotify_reader");
// Make sure the file descriptors are good for use with select().
- CHECK_LE(0, inotify_fd_);
- CHECK_GT(FD_SETSIZE, inotify_fd_);
+ std::array<pollfd, 1> fdarray
+ { {
+ { inotify_fd_, POLLIN, 0 }
+ } };
while (true) {
fd_set rfds;
@@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() {
FD_SET(inotify_fd_, &rfds);
// Wait until some inotify events are available.
- int select_result =
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
- if (select_result < 0) {
- DPLOG(WARNING) << "select failed";
+ int poll_result = HANDLE_EINTR(poll(fdarray.data(), fdarray.size(), -1));
+ if (poll_result < 0) {
+ DPLOG(WARNING) << "poll failed";
return;
}