varlink / libvarlink

C implementation of the Varlink protocol and command line tool
Apache License 2.0
111 stars 15 forks source link

EPOLL constants used in connection.c #6

Closed chergert closed 6 years ago

chergert commented 6 years ago

I did a quick hack using libvarlink from the glib main loop and noticed in connection.c that things are using EPOLLIN and EPOLLOUT constants from sys/epoll.h directly. Given that some projects will need to stay vaguely portable, is it worth modifying these to use the posix POLLIN/POLLOUT?

kaysievers commented 6 years ago

Hmm, libvarlink uses epoll internally, so we use the matching EPOLL* definitions for the calls, but they are not exposed in the public header of the library.

Libvarlink stacks "poll file descriptors", which can only be done with epoll. How would changing the internal-only library code make things more portable, while we cannot really replace epoll in the currently used model anyway?

chergert commented 6 years ago

Clearly I didn't look into things that deep. In the end I switched to using GVariant over a pipe for a number of reasons. Since I don't need this anymore, closing.