23,217
社区成员




while(!quit)
{
int nfds = epoll_wait (m_epoll_fd, m_events, MAX_EVENTS, -1);
...do some thing
}
struct sigaction act;
act.sa_handler = epollProcExit;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
if(sigaction(SIGUSR1,&act,0)!=0)
{
printf("sigaction fail \n");
return 0;
}
while (!pEpoll->m_quit)
{
nFds = ::epoll_wait(pEpoll->m_epfd, pEvents, pEpoll->m_maxLink,-1);
if(nFds == -1 && errno == EINTR)
{
printf("nFds == -1 && errno == EINTR \n");
break;
}