s6-ftrig-wait.html (1812B)
1 <html> 2 <head> 3 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <meta http-equiv="Content-Language" content="en" /> 6 <title>s6: the s6-ftrig-wait program</title> 7 <meta name="Description" content="s6: the s6-ftrig-wait program" /> 8 <meta name="Keywords" content="s6 command s6-ftrig-wait fifodir notification event listener subscriber receive" /> 9 <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> 10 </head> 11 <body> 12 13 <p> 14 <a href="index.html">s6</a><br /> 15 <a href="//skarnet.org/software/">Software</a><br /> 16 <a href="//skarnet.org/">skarnet.org</a> 17 </p> 18 19 <h1> The s6-ftrig-wait program </h1> 20 21 <p> 22 s6-ftrig-wait subscribes to a <a href="fifodir.html">fifodir</a> and 23 waits for a pattern of events to occur on this fifodir. 24 </p> 25 26 <h2> Interface </h2> 27 28 <pre> 29 s6-ftrig-wait [ -t <em>timeout</em> ] <em>fifodir</em> <em>regexp</em> 30 </pre> 31 32 <ul> 33 <li> s6-ftrig-wait subscribes to <em>fifodir</em> </li> 34 <li> It waits for the series of events received on <em>fifodir</em> 35 to match <em>regexp</em>. <em>regexp</em> must be an 36 <a href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04">Extended 37 Regular Expression</a>. </li> 38 <li> When the series of read events matches <em>regexp</em>, 39 s6-ftrig-wait prints the last event it received to stdout (one byte followed by a newline), 40 then exits 0. </li> 41 </ul> 42 43 <h2> Options </h2> 44 45 <ul> 46 <li> <tt>-t <em>timeout</em></tt> : if the events on <em>fifodir</em> have not 47 matched <em>regexp</em> after <em>timeout</em> milliseconds, print an error message on 48 stderr and exit 1. By default, s6-ftrig-wait waits indefinitely for a matching series 49 of events. </li> 50 </ul> 51 52 </body> 53 </html>