mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Linux: Fix redundant fd_set in file_path_watcher_linux.cc (fixes issue #3051)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||||
index 4e231b615e8f..a5100c0bf1c8 100644
|
index 4e231b615e8f..ffb027ebb0a3 100644
|
||||||
--- base/files/file_path_watcher_linux.cc
|
--- base/files/file_path_watcher_linux.cc
|
||||||
+++ base/files/file_path_watcher_linux.cc
|
+++ base/files/file_path_watcher_linux.cc
|
||||||
@@ -5,6 +5,7 @@
|
@@ -5,6 +5,7 @@
|
||||||
@@ -18,7 +18,7 @@ index 4e231b615e8f..a5100c0bf1c8 100644
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -263,8 +265,10 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
@@ -263,19 +265,16 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
||||||
PlatformThread::SetName("inotify_reader");
|
PlatformThread::SetName("inotify_reader");
|
||||||
|
|
||||||
// Make sure the file descriptors are good for use with select().
|
// Make sure the file descriptors are good for use with select().
|
||||||
@@ -30,10 +30,10 @@ index 4e231b615e8f..a5100c0bf1c8 100644
|
|||||||
+ } };
|
+ } };
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
fd_set rfds;
|
- fd_set rfds;
|
||||||
@@ -272,10 +276,9 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
- FD_ZERO(&rfds);
|
||||||
FD_SET(inotify_fd_, &rfds);
|
- FD_SET(inotify_fd_, &rfds);
|
||||||
|
-
|
||||||
// Wait until some inotify events are available.
|
// Wait until some inotify events are available.
|
||||||
- int select_result =
|
- int select_result =
|
||||||
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
|
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
|
||||||
|
Reference in New Issue
Block a user