Compare commits
	
		
			2 Commits
		
	
	
		
			4db64d4da6
			...
			fac2cb08f1
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | fac2cb08f1 | |
|  | 626e081876 | 
|  | @ -16,8 +16,6 @@ | |||
| #include "logcat_thread.h" | ||||
| #include "logcat_entry.h" | ||||
| 
 | ||||
| #define EPOLL_MAX_EVENTS 10 | ||||
| 
 | ||||
| static void mark_nonblock(int fd) { | ||||
|     int flags = fcntl(fd, F_GETFL); | ||||
|     if (flags < 0) { | ||||
|  | @ -223,10 +221,13 @@ void LogcatThread::_run_read_round() { | |||
|     }; | ||||
| 
 | ||||
| #ifdef USE_EPOLL | ||||
|     struct epoll_event events[EPOLL_MAX_EVENTS]; | ||||
|     struct epoll_event events[2]; | ||||
| 
 | ||||
|     int ready_fds = epoll_wait(this->_epoll_fd, events, EPOLL_MAX_EVENTS, 1000); | ||||
|     int ready_fds = epoll_wait(this->_epoll_fd, events, 2, 1000); | ||||
|     if (ready_fds == -1) { | ||||
|         if (errno == EINTR) { | ||||
|             return; | ||||
|         } | ||||
|         try { | ||||
|             throw_system_error("epoll_wait()"); | ||||
|         } catch (const std::exception& e) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue