ecore_main: handle EPOLLHUP 22/53122/2 accepted/tizen/mobile/20151202.230551 accepted/tizen/tv/20151202.230611 accepted/tizen/wearable/20151202.230627 submit/tizen/20151202.115651
authorMinJeong Kim <minjjj.kim@samsung.com>
Wed, 2 Dec 2015 02:49:46 +0000 (11:49 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 2 Dec 2015 06:41:22 +0000 (22:41 -0800)
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

index ebd66eb..9c370d4 100644 (file)
@@ -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);
      }