How to get errno when epoll_wait returns EPOLLERR?

前端 未结 4 1290
鱼传尺愫
鱼传尺愫 2021-02-07 12:51

Is there a way to find out the errno when epoll_wait returns EPOLLERR for a particular fd?

Is there any further information about

4条回答
  •  你的背包
    2021-02-07 13:35

    Include errno.h and use perror to see the error message. Basically error is from the epfd or interupt, it will not arise from the file descriptor in your set.

    include "errno.h"

    if(epoll_wait() == -1)
        {
          perror("Epoll error : ");
        }
    

提交回复
热议问题