diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-24 10:32:20 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-11-24 10:32:20 +0000 |
commit | 79d5c4eff6101f329b8ea52dd9e6d2336ea8bc93 (patch) | |
tree | 7e431c88dfea84b57128acbc1084475884c4820a | |
parent | a43216278137fe399cdcea6210e580b445e16197 (diff) | |
download | execline-79d5c4eff6101f329b8ea52dd9e6d2336ea8bc93.tar.xz |
More trap doc
-rw-r--r-- | doc/trap.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/trap.html b/doc/trap.html index fafd5c7..fec5501 100644 --- a/doc/trap.html +++ b/doc/trap.html @@ -83,11 +83,13 @@ this option does nothing. </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 +<code><a href="importas.html">importas</a> ! !</code> to retrieve the pid of <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> +<code><a href="multisubstitute.html">multisubstitute</a> { importas ! ! importas SIGNAL SIGNAL }<code> to get both <tt>$!</tt> and <tt>$SIGNAL</tt> substitutions. </li> + <li> The <tt>-x</tt> option is basically a shortcut for a <code>default { +multisusbstitute { importas ! ! importas SIGNAL SIGNAL } kill -$SIGNAL $! }</code> directive. </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 |