SigFn
|
Bind callback functions to OS signals in C and C++.
SigFn has the following requirements:
SigFn can be built in a few steps using cmake.
A standard build will provide the shared and static libraries:
A few optional flags can be specified in the configuration:
SIGFN_TESTS
: Build unit testsSIGFN_COVER
: Evaluate code coverage(requires SIGFN_TESTS
, not supported on Windows)SIGFN_EXAMPLES
: Build SigFn C and C++ examplesSIGFN_DOCS
: Build documentation using DOXYGENThe unit tests can be built and run using the following commands:
SigFn provides sigfn.h
and sigfn.hpp
for usage with C and C++, respectively.
Basic SigFn usage in C. It is copied from pause.c
in the examples
directory.
Basic SigFn usage in C++. It is copied from pause.cpp
in the examples
directory.