Skip to content
kqueue(2) compatibility library
C Roff CMake Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include/sys
kern Strip whitespace from line endings Feb 22, 2019
kqlite Strip whitespace from line endings Feb 22, 2019
pkg * Install event.h in $INCLUDEDIR/kqueue/sys, rather than $INCLUDEDIR… Mar 6, 2019
src Fix illegal access on the cleanup pipe under linux Closes #70 Jan 30, 2020
test Strip whitespace from line endings Feb 22, 2019
.gitignore Ignore all versions of libkqueue.so Apr 2, 2019
.travis.yml Strip whitespace from line endings Feb 22, 2019
BUGS Strip whitespace from line endings Feb 22, 2019
CMakeLists.txt fix debian packaging to create shlibs file Apr 2, 2019
ChangeLog * Install event.h in $INCLUDEDIR/kqueue/sys, rather than $INCLUDEDIR… Mar 6, 2019
LICENSE Rename COPYING to LICENSE to match libpwq/ May 8, 2013
README.md Document debugging environmental variable Mar 25, 2019
TODO kevent: refactor to remove goto statement Sep 18, 2018
Vagrantfile Bump Vagrantfile to Bionic Apr 2, 2019
config.h.in rewrite the build system Dec 6, 2016
kqueue.2 Strip whitespace from line endings Feb 22, 2019
libkqueue.pc.in Strip whitespace from line endings Feb 22, 2019

README.md

libkqueue

Travis CI build status

A user space implementation of the kqueue(2) kernel event notification mechanism libkqueue acts as a translator between the kevent structure and the native kernel facilities on Linux, Android, Solaris, and Windows.

Supported Event Types

  • vnode
  • socket
  • proc
  • user
  • timer

Installation - Linux, Solaris

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib <path to source>
make
make install

Installation - Red Hat

cmake3 -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib <path to source>
make
cpack3 -G RPM

Installation - Debian

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib <path to source>
make
cpack -G DEB

Installation - Android

cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=<path to NDK compiler> -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib <path to source>
make

Windows (Visual Studio Project)

cmake -G "Visual Studio 14 2015" <path to source>
cmake --build .

Windows (clang/C2) (Visual Studio Project)

cmake -G "Visual Studio 14 2015" -T "LLVM-vs2014" <path to source>
cmake --build .

Xcode (project)

cmake -G "Xcode" <path to source>

Running Unit Tests

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_TESTING=YES <path to source>
make
make test

Debugging

Ensure -DNDEBUG is NOT passed during compilation, otherwise all debug output will be disabled.

KQUEUE_DEBUG=1 <your application>

Building Applications

CFLAGS += -I/usr/include/kqueue
LDFLAGS += -lkqueue

Tutorials & Examples

Kqueues for Fun and Profit

Handling TCP Connections with Kqueue Event Notification

Releases History

2.0 add support for Android 2013-04-29

1.0 stable relesae for Linux, Solaris, and Windows 2010-09-18

You can’t perform that action at this time.