S6-FTRIGRD(8)
π s6-ftrigrd β the helper that babysits your subscriptions
okay so real talk, this is a page from the System Manager's Manual, and it's about s6-ftrigrd, a helper program that manages a whole set of subscriptions to s6-fifodir(7)s plus regular expressions on events. yes bestie, both. at the same time. she's multi-talented. π
β¨ SYNOPSIS β¨
s6-ftrigrd
that's it. that's the whole synopsis. no flags, no args, no drama. π
πΈ DESCRIPTION πΈ
okay so here's the tea: s6-ftrigrd takes orders from its client program β the client controls it via s6-ftrigr(7) β and then it notifies that client when the desired events actually happen. it is not meant to be called directly. like, do not just run this at your shell and expect a good time, bestie. it's got main character energy but it needs direction. π
here's how she gets launched, depending on what your client does:
- if the client program uses
ftrigr_startf(), it spawns an instance ofs6-ftrigrdas a child. in that case,s6-ftrigrd'sstdinis a pipe reading from the client; itsstdoutis a pipe writing to the client; itsstderris the same as the client's; and there's an additional pipe froms6-ftrigrdto the client, used for asynchronous notifications. lots of pipes. plumbing queen. πͺ β¨ - if the client program uses
ftrigr_start(), then it tries to connect to a Unix domain socket. ans6-ftrigrdlocal service should be listening on that socket β like, a Unix domain super-server such ass6-ipcserver(8)spawning ans6-ftrigrdprogram on every connection. then, boom, ans6-ftrigrdinstance is created for the client. π¦ - when the client uses
ftrigr_end(), or closess6-ftrigrd'sstdinin any way,s6-ftrigrdexits0. clean exit, no tears, we love to see it. π
so what does she actually do all day? s6-ftrigrd handles the grunt work of creating fifos in a fifodir for a subscriber. iconic of her honestly. she also wakes up on every event, and compares the chain of events she received on a given fifodir with the client-provided regexp. if the chain of events matches the regexp, she notifies the client. that's the whole job. she ate. π
the connection management between the client and s6-ftrigrd is entirely done by the textclient library from skalibs[1]. not her problem, not her circus. π€
β οΈ okay important heads up:s6-ftrigrdis entirely asynchronous. she stores unread notifications into heap memory, and she can grow in size if there are a lot of events and the client fails to read them. that's your cue to not let her balloon, bestie. to avoid uncontrolled growth, make sure your client callsftrigr_update()as soon asftrigr_fd()becomes readable. fr fr, don't sleep on that. π€
and there's a hard limit: an s6-ftrigrd instance can only handle up to FTRIGRD_MAX (defined in s6/ftrigr.h) subscriptions at once. by default, this number is 1000, which is more than enough for any reasonable system. a thousand subscriptions. she's booked and busy. ππΈ
π SEE ALSO π
s6-cleanfifodir(8)s6-ftrig-listen(8)s6-ftrig-listen1(8)s6-ftrig-notify(8)s6-ftrig-wait(8)s6-mkfifodir(8)
[1] https://skarnet.org/software/skalibs/
this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/libs6/s6-ftrigrd.html
π«Ά AUTHORS π«Ά
- Laurent Bercot
- Alexis <flexibeast@gmail.com> (man page port)
and that's the whole page, bestie β no cap, every last detail kept intact. this Debian build is dated September 29, 2021, and it's S6-FTRIGRD(8) all the way down. go forth and subscribe responsibly β¨π¦π
π¦ where this page comes from
- nixpkgs unstable: s6 2.15.1.0
- nixpkgs unstable: s6-man-pages 2.14.0.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms