Search code examples
linuxselectepoll

chaining multiple epoll instances


Can we add file descriptor returned by epoll_create to another epoll instance using epoll_ctl. how do we chain multiple epoll instances in the application, lets say if we have 2 epoll instances one coming from the application and the other coming from library. Please advise.


Solution

  • From man epoll

    Q3 Is the epoll file descriptor itself poll/epoll/selectable?

    A3 Yes. If an epoll file descriptor has events waiting, then it will indicate as being readable.