S6-FTRIG-LISTEN(8)
π S6-FTRIG-LISTEN(8) π
okay bestie, this is a page from the System Managerβs Manual, and itβs giving βsubscribe to a bunch of fifodirs, spawn a program, then wait for the event pattern to hitβ energy. Letβs go. π«Ά
β¨ NAME β¨
s6-ftrig-listenβ subscribe to severals6-fifodir(7)s, spawn a program, then wait for pattern of events to occur on the fifodirs π
πΈ SYNOPSIS πΈ
In an execlineb(1) script:
s6-ftrig-listen [-a | -o] [-t timeout] {fifodir-1 regexp-1 fifodir-2
regexp-2} prog...
π¦ DESCRIPTION π¦
So s6-ftrig-listen subscribes to fifodir1 with the regexp regexp1, to fifodir2 with regexp2, and so on. Like, all the fifodirs, all the regexps, one big subscription moment. β¨
Then it forks and execs prog... with all its arguments. Main character behavior, honestly. π
It waits for the series of events received on fifodir-i to match regexp-i. And regexp-i must be Extended Regular Expressions[1]. Periodt. π
When the series of read events matches the regexps, s6-ftrig-listen exits 0. π
You can also use s6-ftrig-listen outside an execlineb script by using the internal argv syntax, but heads up:
β οΈ that syntax is an implementation detail and is not documented as stable. Donβt build your whole personality on it, iykyk. π
In a shell script, use:
execlineb -Pc 's6-ftrig-listen ...'
to get the benefits of the execlineb brace syntax. slay. π
π OPTIONS π
-t timeoutβ If the events on the fifodirs have not matched the regexps aftertimeoutmilliseconds, print an error message onstderrand exit1. By default,s6-ftrig-listenwaits indefinitely for a matching series of events. β³-aβ And (conjunction).s6-ftrig-listenwill only exit when all thefifodir-ihave been notified with events matching the correspondingregexp-i. This is the default. π-oβ Or (disjunction).s6-ftrig-listenwill exit as soon as one of thefifodir-ihas been notified with events matching itsregexp-i. β‘
π SEE ALSO π
execlineb(1)s6-cleanfifodir(8)s6-ftrig-listen1(8)s6-ftrig-notify(8)s6-ftrig-wait(8)s6-ftrigrd(8)s6-mkfifodir(8)
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_04
This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-ftrig-listen.html π§
π AUTHORS π
- Laurent Bercot
- Alexis
<flexibeast@gmail.com>(man page port)
okay thatβs the whole page, bestie β this oneβs the Debian version, dated September 29, 2021. bye byeee! ππ
π¦ 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