mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-10-30 20:21:56 +00:00 
			
		
		
		
	[client] x11: handle EINTR properly in epoll loop
This commit is contained in:
		| @@ -27,6 +27,7 @@ | ||||
| #include <string.h> | ||||
| #include <unistd.h> | ||||
| #include <sys/epoll.h> | ||||
| #include <errno.h> | ||||
|  | ||||
| #include <X11/extensions/XInput2.h> | ||||
| #include <X11/extensions/scrnsaver.h> | ||||
| @@ -748,6 +749,9 @@ static int x11EventThread(void * unused) | ||||
|       int nfds = epoll_wait(epollfd, events, 1, 100); | ||||
|       if (nfds == -1) | ||||
|       { | ||||
|         if (errno == EINTR) | ||||
|           continue; | ||||
|  | ||||
|         close(epollfd); | ||||
|         DEBUG_ERROR("epoll_wait failure"); | ||||
|         return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Geoffrey McRae
					Geoffrey McRae