From d01c0db20e41cfb42a0ebbbd24c0ff3dbbc75f4e Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Wed, 2 Dec 2015 11:49:46 +0900 Subject: [PATCH] ecore_main: handle EPOLLHUP When hang up happened on the file descriptor, there are no solution to prevent infinite loop for handling the file descriptor. To resolve thie problem, EPOLLHUP handling process is added. @fix Change-Id: Ibce80c1adfd6a2744347130e0942199aff9396dc --- src/lib/ecore/ecore_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index ebd66eb..9c370d4 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -71,6 +71,7 @@ # define EPOLLPRI 2 # define EPOLLOUT 4 # define EPOLLERR 8 +# define EPOLLHUP 16 #define EPOLL_CTL_ADD 1 #define EPOLL_CTL_DEL 2 @@ -502,6 +503,8 @@ _ecore_main_fdh_epoll_mark_active(void) fdh->write_active = EINA_TRUE; if (ev[i].events & EPOLLERR) fdh->error_active = EINA_TRUE; + if (ev[i].events & EPOLLHUP) + fdh->error_active = EINA_TRUE; _ecore_try_add_to_call_list(fdh); } -- 2.7.4