S6-LIBS6(7)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

πŸ’… S6-LIBS6(7) πŸ’…

okay bestie, so this one lives in the Miscellaneous Information Manual section, and it's basically the master doc for s6-libs6 β€” the whole collection of utility C interfaces that the s6 executables are built on. Cute, right? Let's get into it ✨


πŸŽ€ NAME πŸŽ€

s6-libs6 β€” the whole collection of utility C interfaces, the ones used in the s6 executables. it's giving "library girlboss" honestly πŸ‘‘


🌸 DESCRIPTION 🌸

✨ Compiling ✨

first things first: make sure the s6 headers and the skalibs headers are visible in your header search path. no cap, both of them.

then you just go:

#include <s6/s6.h>

and you're cooking 🫢

πŸ’œ Linking πŸ’œ

same energy but for the libraries β€” make sure the s6 libraries and the skalibs libraries are visible in your library search path.

link against -ls6 and -lskarnet, that's the bare minimum bestie.

now, the extra bits (iykyk):

  • if you're using socket functions (which is literally the case with s6-ftrigr(7), 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 s6-ftrigr(7), for instance), add `cat $sysdeps/sysclock.lib` ⏰

and "$sysdeps" stands for your skalibs sysdeps directory. periodt.

πŸ¦‹ Programming πŸ¦‹

so here's the tea: the s6/s6.h header is actually a concatenation of other headers. libs6 is separated into several modules, and every single one of them has its own header. iconic modular behaviour, honestly 🌈

  • the s6/accessrules.h header provides functions to check credentials against configuration files β€” refer to s6-accessrules(7) πŸ”
  • the s6/ftrigr.h header provides functions to subscribe to s6-fifodir(7)s and be notified of events β€” refer to s6-ftrigr(7) πŸ“‘
  • the s6/ftrigw.h header provides functions to manage s6-fifodir(7)s and send notifications to them β€” refer to s6-ftrigw(7) πŸ“¨
  • the s6/s6lock.h header provides functions to acquire locks with a timeout β€” refer to s6-s6lock(7) πŸ”’
  • the s6/s6-fdholder.h header provides functions to communicate with an s6-fdholderd(8) server and exchange file descriptors with it β€” refer to s6-fdholder(7) πŸ—‚οΈ

⭐ SEE ALSO ⭐

s6-accessrules(7), s6-fdholder(7), s6-ftrigr(7), s6-ftrigw(7), s6-s6lock(7)

also, for the record: this man page is ported from the authoritative documentation at https://skarnet.org/software/s6/libs6/ β€” the source of truth, fr fr πŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

Laurent Bercot Alexis <flexibeast@gmail.com> (man page port) 🫢


aaaand that's the whole vibe check πŸ’… this one's from the Debian crew, dated September 29, 2021, page S6-LIBS6(7) β€” go forth and link responsibly, bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from