This is an unofficial port of OpenBSD's imsg interface to linux.
The imsg functions provide a simple mechanism for communication
between local processes using sockets. Each transmitted message is
guaranteed to be presented to the receiving program whole.
They are commonly used in privilege separated processes, where
processes with different rights are required to cooperate.
The port has been tested to compile and install with GCC 9.3.0 and Clang 11.0.0, with GNU Make.
make
make test
make install
man imsg_init
PS: This port requires <sys/queue.h> and if using glibc, then >=2.25.0,
for the explicit_bzero
function.
This port creates both a shared library libimsg.so
and a static library
libimsg.a
. To use them, just link with -limsg
.
This port is as faithful as possible to the OpenBSD implementation.
The only addition is the src/_imsg_compat.h header
file which defines static standalone implementations of compat functions.
The port has been made possible due to the excellent works of the tmux team and of course OpenBSD for creating it.