Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

kqueue is a BSD feature. you cannot use it on Linux. the equivalent feature on Linux is epoll.

If you want t try kqueue in any platform other than BSD, then https://github.com/mheily/libkqueue library is your way to go!! give this a try.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top