3 ms·
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 essential
by rwmj 4y ago
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.
- ajross 4y agoIndeed, I am all but certain you can epoll on socketpairs. That sounds like a mistake in the article.
- kentonv 4y agoHmm, 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.
- graham_king_3 4y agoYou can and they do. The article says: There are four epoll-able ways for processes or threads to communicate: - UNIX socket pairs: man socketpair.