emuld : added interrupted system call exception handling
authorDaiYoung Kim <daiyoung777.kim@samsung.com>
Tue, 9 Apr 2013 08:52:20 +0000 (17:52 +0900)
committerDaiYoung Kim <daiyoung777.kim@samsung.com>
Tue, 9 Apr 2013 08:52:20 +0000 (17:52 +0900)
Signed-off-by: DaiYoung, Kim <daiyoung777.kim@samsung.com>
packaging/emuld.spec
src/emuld.c

index 1f6ba9772b9a79e9e88ec4c6c31dca1ab964fbf0..1e5a89d71369273ae60b3c4c7775a98b16bd7b83 100644 (file)
@@ -1,6 +1,6 @@
 #git:/slp/pkgs/e/emulator-daemon
 Name: emuld
-Version: 0.2.31
+Version: 0.2.32
 Release: 1
 Summary: emuld is used for communication emulator between and ide.
 License: Apache
index 209a3cccda519ed3b40621e4925802e3927a6cdf..16470c37d4bab7bbaec47fd4ee9435fd54d37942 100644 (file)
@@ -35,6 +35,7 @@ License: GNU General Public License
 ------------------------------------------------------------------*/
 #include "emuld_common.h"
 #include "emuld.h"
+#include <error.h>
 
 
 #define MAX_CONNECT_TRY_COUNT  (60 * 3)
@@ -1062,7 +1063,7 @@ bool server_process(void)
        int cli_sockfd;
        int cli_len = sizeof(cli_addr);
 
-       nfds = epoll_wait(g_epoll_fd,g_events,MAX_EVENTS,100); /* timeout 100ms */
+       nfds = epoll_wait(g_epoll_fd, g_events,MAX_EVENTS, 100); /* timeout 100ms */
 
        if(nfds == 0){
                /* no event , no work */
@@ -1073,6 +1074,8 @@ bool server_process(void)
        if(nfds < 0) {
                fprintf(stderr, "epoll wait error\n");
                /* return but this is epoll wait error */
+               if (errno == EINTR)
+                       return false;
                return true;
        }