Search code examples
csocketskqueue

Trying to use Kqueue in linux mint debian


I am Trying to use kqueue for doing an event oriented server in c when i compile my code it give me this error

fatal error: sys/event.h: No such file or directory

according to a tutorial that I am following to create the kqueue events that file have to be include I am new to events programming in C


Solution

  • kqueue is only present in BSD (FreeBSD / OpenBSD) and Darwin (Mac OS X / iOS) kernels. It does not exist in the Linux kernel.

    The closest equivalents available on Linux are epoll for asynchronous I/O, and inotify for file system watches.