------------------------------------------------------------------*/
#include "emuld_common.h"
#include "emuld.h"
+#include <error.h>
#define MAX_CONNECT_TRY_COUNT (60 * 3)
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 */
if(nfds < 0) {
fprintf(stderr, "epoll wait error\n");
/* return but this is epoll wait error */
+ if (errno == EINTR)
+ return false;
return true;
}