diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-12-28 13:17:44 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-12-28 13:27:02 +0200 |
commit | e7cd377f7801d42aa8e07addff93d2150666c237 (patch) | |
tree | e2a7c118bde14224e96e604e925d65448ab96fc3 /doc | |
parent | c15c42ccd1e2377945fd0414eca1a49294bff454 (diff) | |
download | tar-e7cd377f7801d42aa8e07addff93d2150666c237.tar.gz |
Implement the "wait" checkpoint action.
This action instructs tar to pause until given signal is delivered.
The newer genfile tool uses this action for communication between
genfile and tar in exec mode. This eliminates race conitions and
speeds up the tests based on exec mode.
* doc/tar.texi: Document changes.
* paxutils: Upgrade.
* src/checkpoint.c: Implement the wait action.
* src/common.h (decode_signal): New proto.
* src/tar.c (decode_signal): New function.
(set_stat_signal): Rewrite.
* tests/dirrem01.at: Adjust genfile and tar command line arguments
to use the new feature.
* tests/dirrem02.at: Likewise.
* tests/filerem01.at: Likewise.
* tests/filerem02.at: Likewise.
* tests/grow.at: Likewise.
* tests/sptrcreat.at: Likewise.
* tests/sptrdiff00.at: Likewise.
* tests/sptrdiff01.at: Likewise.
* tests/truncate.at: Likewise.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tar.texi | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/tar.texi b/doc/tar.texi index 1362216c..a81851b3 100644 --- a/doc/tar.texi +++ b/doc/tar.texi @@ -2553,6 +2553,12 @@ Wait for @var{time} seconds. @item ttyout=@var{string} Output @var{string} on the current console (@file{/dev/tty}). + +@item totals +Print statistics (see @pxref{totals}). + +@item wait=@var{signo} +Wait for signal @var{signo}. @end table Several @option{--checkpoint-action} options can be specified. The @@ -4452,6 +4458,25 @@ checkpoint: $ @kbd{tar -c --checkpoint=1000 --checkpoint-action=sleep=30} @end smallexample +@anchor{checkpoint wait} +@cindex @code{wait}, checkpoint action +The @code{wait=@var{signo}} action stops further execution until the +signal @var{signo} is delivered. Valid values for @var{signo} are: +@code{SIGHUP}, @code{SIGQUIT}, @code{SIGINT}, @code{SIGUSR1} and +@code{SIGUSR2}. The @samp{SIG} prefix is optional. For example: + +@example +$ @kbd{tar -c -f arc --checkpoint=1000 --checkpoint-action wait=USR1 .} +@end example + +In this example, @GNUTAR{} will stop archivation at each 1000th +checkpoint. wait until the @samp{SIGUSR1} signal is delivered, +and resume processing. + +This action is used by the @command{genfile} utility to perform +modifications on the input files upon hitting certain checkpoints +(@pxref{Exec Mode, genfile}). + @anchor{checkpoint exec} @cindex @code{exec}, checkpoint action Finally, the @code{exec} action executes a given external command. |