News for hackers. Stuff that matters.
Re:Linux: What Can You Epoll? by rwmj on Saturday October 22, 2022 @01:08PM (#33300075)
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.
Re:Linux: What Can You Epoll? by ajross on Saturday October 22, 2022 @01:20PM (#33300161)
Indeed, I am all but certain you can epoll on socketpairs. That sounds like a mistake in the article.
Re:Linux: What Can You Epoll? by kentonv on Saturday October 22, 2022 @03:22PM (#33301283)
Hmm, I don't think that's it says (unless they edited it since your post?). It mentions socketpair explicitly as something that is epoll-friendly, and which you can use to communicate with another thread, in the case where you must create a thread to perform some blocking task but still want to get completion notification in the main thread via epoll.
Re:Linux: What Can You Epoll? by graham_king_3 on Sunday October 23, 2022 @04:49PM (#33310133)
You can and they do. The article says:

    There are four epoll-able ways for processes or threads to communicate:
    - UNIX socket pairs: man socketpair.