【发布时间】:2014-12-20 05:29:44
【问题描述】:
假设我通过调用创建 epoll 文件描述符(epfd)
epfd = epoll_create( 10 );
接下来,我通过调用 epoll_ctl(epfd,EPOLL_CTL_ADD,...) 将一些文件描述符计数添加到该集合中,并通过在单独的线程中调用 epoll_wait 来等待事件循环中的事件。
如果我在 epoll 集不为空且 epoll_wait(epfd,...) 正在进行时关闭 epfd(通过在线程中调用 close(epfd),而不是 epoll_wait 线程)会发生什么? epoll_wait 是否终止?结果是什么?
【问题讨论】:
标签: epoll