diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/forstdin.html | 4 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/trap.html | 25 | ||||
-rw-r--r-- | doc/upgrade.html | 10 |
4 files changed, 27 insertions, 16 deletions
diff --git a/doc/forstdin.html b/doc/forstdin.html index 5228aee..f57ee9c 100644 --- a/doc/forstdin.html +++ b/doc/forstdin.html @@ -30,7 +30,7 @@ run another program. </p> <pre> - forstdin [ -p | -o <em>okcodes</em> | -x <em>breakcodes</em> ] [ -n ] [ -C | -c ] [ -0 | -d <em>delim</em> ] <em>variable</em> <em>loop...</em> + forstdin [ -p | -o <em>okcodes</em> | -x <em>breakcodes</em> ] [ -e eofcode ] [ -n ] [ -C | -c ] [ -0 | -d <em>delim</em> ] <em>variable</em> <em>loop...</em> </pre> <ul> @@ -63,6 +63,8 @@ not listed in <em>okcodes</em>, forstdin will exit immediately with an option, but with inverted meaning - the listed exit codes are codes that will make forstdin break the loop and exit, and the unlisted exit codes will make it keep looping. </li> + <li> <tt>-e</tt> <em>eofcode</em> : if forstdin reads EOF, +exit <em>eofcode</em>. Default is 0. </li> <li> Other options are used to <a href="el_transform.html">control the substitution mechanism</a> for every <em>x</em>. Of course, you can't split <em>x</em>. </li> diff --git a/doc/index.html b/doc/index.html index cb411a6..c04c9d7 100644 --- a/doc/index.html +++ b/doc/index.html @@ -51,7 +51,7 @@ shell's syntax, and has no security issues. <li> A POSIX-compliant system with a standard C development environment </li> <li> GNU make, version 3.81 or later. </li> <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version -2.9.3.0 or later. It's a build-time requirement. It's also a run-time +2.9.4.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library. </li> </ul> @@ -66,7 +66,7 @@ library. </li> <h3> Download </h3> <ul> - <li> The current released version of execline is <a href="execline-2.6.1.1.tar.gz">2.6.1.1</a>. </li> + <li> The current released version of execline is <a href="execline-2.7.0.0.tar.gz">2.7.0.0</a>. </li> <li> Alternatively, you can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/execline/">execline git repository</a>: diff --git a/doc/trap.html b/doc/trap.html index 03d5bc4..fafd5c7 100644 --- a/doc/trap.html +++ b/doc/trap.html @@ -28,12 +28,12 @@ to the signals it catches. </p> <pre> - trap [ -x ] [ -t <em>millisecs</em> ] + trap [ -x ] { - [ timeout { <em>progtimeout...</em> } ] [ SIGTERM { <em>progsigterm...</em> } ] [ quit { <em>progsigquit...</em> } ] [ 1 { <em>progsighup</em>... } ] + [ default { <em>progdefault</em>... } ] ... } <em>prog...</em> @@ -50,12 +50,12 @@ name (case-insensitive, with or without the <tt>SIG</tt> prefix), run when the specified event occurs. </li> <li> <tt>trap</tt> sets traps for the various directives it reads. A trap for <tt>SIGTERM</tt> will be triggered when the <tt>trap</tt> -program receives a SIGTERM. -A trap for <tt>timeout</tt> will be triggered when <em>millisecs</em> -milliseconds elapse without a signal being caught. </li> +program receives a SIGTERM. A <tt>default</tt> +trap will be used for any signal that is not caught by another trap. </li> <li> It spawns a child executing <em>prog...</em>. </li> <li> It sets the <tt>!</tt> environment -variable to the pid of the <em>prog...</em> process. </li> +variable to the pid of the <em>prog...</em> process, and the <tt>SIGNAL</tt> +environment variable to the trapped signal. </li> <li> Whenever it catches a signal, it spawns the program described in the corresponding directive. It will not spawn a program for the same signal twice: if the first subprocess is still active when another instance of the @@ -75,12 +75,8 @@ SIGTERM, unless caught by a <tt>SIGTERM</tt> directive, will kill the <tt>trap</tt> process (and leave <em>prog</em> running). With the <tt>-x</tt> option, without a <tt>SIGTERM</tt> directive, a SIGTERM will be still be caught by <tt>trap</tt>, that will send it to -<em>prog</em>. </li> - <li> <tt>-t <em>millisecs</em></tt> : if a <tt>timeout</tt> -directive exists, the corresponding <em>progtimeout...</em> will be run -every time <em>millisecs</em> milliseconds elapse without <tt>trap</tt> -receiving a signal. By default, <em>millisecs</em> is 0, which means -infinite (i.e. a <tt>timeout</tt> directive will never trigger). </li> +<em>prog</em>. Note that if a <tt>default</tt> directive is present, +this option does nothing. </li> </ul> <h2> Notes </h2> @@ -88,7 +84,10 @@ infinite (i.e. a <tt>timeout</tt> directive will never trigger). </li> <ul> <li> Programs defined in command line directives can start with <tt><a href="importas.html">importas</a> ! !</tt> to retrieve the pid of -<em>prog</em> in <tt>${!}</tt> </li> +<em>prog</em> in <tt>$!</tt>. If they need the signal number, which +can be the case in <tt>default</tt> directives, they can for instance use +<tt><a href="multisubstitute.html">multisubstitute</a> { importas ! ! importas SIGNAL SIGNAL }</tt> +to get both <tt>$!</tt> and <tt>$SIGNAL</tt> substitutions. </li> <li> <tt>trap</tt> is a standard shell builtin, with similar functionality. It is more idiomatic, and probably more efficient, to use that builtin in shell scripts, and to only use the diff --git a/doc/upgrade.html b/doc/upgrade.html index fd6e41b..aa23ab2 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,16 @@ <h1> What has changed in execline </h1> +<h2> in 2.7.0.0 </h2> + +<ul> + <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> +dependency bumped to 2.9.4.0. </li> + <li> New <tt>-e</tt> option to <a href="forstdin.html">forstdin</a>. </li> + <li> New <tt>default</tt> directive to <a href="trap.html">trap</a>, +replacing the <tt>timeout</tt> one, which was ill-suited to that program. </li> +</ul> + <h2> in 2.6.1.1 </h2> <ul> |