aboutsummaryrefslogtreecommitdiffstats
s6: the s6 library interface

s6
Software
skarnet.org

The s6 library interface

General information

libs6 is a collection of utility C interfaces, used in the s6 executables.

Compiling

  • Make sure the s6 headers, as well as the skalibs headers, are visible in your header search path.
  • Use #include <s6/s6.h>

Linking

  • Make sure the s6 libraries, as well as the skalibs libraries, are visible in your library search path.
  • Link against -ls6 and -lskarnet. If you're using socket functions (which is the case with libftrigr, for instance, add `cat $sysdeps/socket.lib` to your command line. If you're using timed functions involving TAI timestamps (which is also the case with libftrigr for instance), add `cat $sysdeps/sysclock.lib`. $sysdeps stands for your skalibs sysdeps directory.

Programming

The s6/s6.h header is actually a concatenation of other headers: the libs6 is separated into several modules, each of them with its own header.

  • The s6/accessrules.h header provides functions to check credentials against configuration files.
  • The s6/ftrigr.h header provides functions to subscribe to fifodirs and be notified of events.
  • The s6/ftrigw.h header provides functions to manage fifodirs and send notifications to them.
  • The s6/fdholder.h header provides functions to communicate with a s6-fdholderd server and exchange file descriptors with it.