It's weird that (according to this document) you can epoll Unix domain sockets but not sockets created by socketpair(2). I thought socketpair created essentially two pre-connected Unix domain sockets.
There are four epoll-able ways for processes or threads to communicate:
- UNIX socket pairs: man socketpair.