summaryrefslogtreecommitdiff
path: root/doc/s6-ftrig-wait.html
blob: 681567bf507d8147683ad9f7c658940c8ba94867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Language" content="en" />
    <title>s6: the s6-ftrig-wait program</title>
    <meta name="Description" content="s6: the s6-ftrig-wait program" />
    <meta name="Keywords" content="s6 command s6-ftrig-wait fifodir notification event listener subscriber receive" />
    <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
  </head>
<body>

<p>
<a href="index.html">s6</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>

<h1> The s6-ftrig-wait program </h1>

<p>
s6-ftrig-wait subscribes to a <a href="fifodir.html">fifodir</a> and
waits for a pattern of events to occur on this fifodir.
</p>

<h2> Interface </h2>

<pre>
     s6-ftrig-wait [ -t <em>timeout</em> ] <em>fifodir</em> <em>regexp</em>
</pre>

<ul>
 <li> s6-ftrig-wait subscribes to <em>fifodir</em> </li>
 <li> It waits for the series of events received on <em>fifodir</em>
to match <em>regexp</em>. <em>regexp</em> must be an
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04">Extended
Regular Expression</a>. </li>
 <li> When the series of read events matches <em>regexp</em>,
s6-ftrig-wait prints the last event it received to stdout (one byte followed by a newline),
then exits 0. </li>
</ul>

<h2> Options </h2>

<ul>
 <li> <tt>-t <em>timeout</em></tt>&nbsp;: if the events on <em>fifodir</em> have not
matched <em>regexp</em> after <em>timeout</em> milliseconds, print an error message on
stderr and exit 1. By default, s6-ftrig-wait waits indefinitely for a matching series
of events. </li>
</ul>

</body>
</html>