1. 9

  2. 6

    Sometimes it’s impossible to forbid users from calling close themselves. For this reason it’s hard to build correct thin abstraction layers on top of epoll.

    Man, this is the leakiest abstraction.

    I happen to like using kqueue, and I’ve definitely written code which absolutely depends on close -> unregister. It could probably be dealt with, but certainly annoying.

    1. 1

      I actually tried it with code you wrote, never finished it because it was really bad. https://github.com/Duncaen/openrebound/blob/master/libopenbsd/kqueue_epoll.c I think i stopped when i realized that i cant really close the sockets and then replaced the close calls with shutdown to close them later somewhere.

    2. 1

      I was wondering about batch syscall interface and possible use instead of poll/epoll. If one could ask system to do one of a bunch of system calls. Then the calls could be reads and writes with the same buffer used.