mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-07-30 10:52:36 +00:00
Fix the use of --checkpoint without explicit --checkpoint-action
* src/checkpoint.c (checkpoint_finish_compile): Set default action, if necessary. * tests/checkpoint/defaults.at: New testcase. * tests/checkpoint/dot-compat.at: New testcase. * tests/checkpoint/dot-int.at: New testcase. * tests/checkpoint/dot.at: New testcase. * tests/checkpoint/interval.at: New testcase. * tests/Makefile.am: Add new testcases. * tests/testsuite.at Include new testcases.
This commit is contained in:
+10
-8
@@ -149,18 +149,20 @@ checkpoint_compile_action (const char *str)
|
||||
void
|
||||
checkpoint_finish_compile (void)
|
||||
{
|
||||
if (checkpoint_state == CHKP_INIT
|
||||
&& checkpoint_option
|
||||
&& !checkpoint_action)
|
||||
{
|
||||
/* Provide a historical default */
|
||||
checkpoint_compile_action ("echo");
|
||||
}
|
||||
|
||||
if (checkpoint_state == CHKP_COMPILE)
|
||||
{
|
||||
sigprocmask (SIG_BLOCK, &sigs, NULL);
|
||||
|
||||
if (checkpoint_option)
|
||||
{
|
||||
if (!checkpoint_action)
|
||||
/* Provide a historical default */
|
||||
checkpoint_compile_action ("echo");
|
||||
}
|
||||
else if (checkpoint_action)
|
||||
/* Otherwise, set default checkpoint rate */
|
||||
if (!checkpoint_option)
|
||||
/* set default checkpoint rate */
|
||||
checkpoint_option = DEFAULT_CHECKPOINT;
|
||||
|
||||
checkpoint_state = CHKP_RUN;
|
||||
|
||||
Reference in New Issue
Block a user