daily_checkpoint.sh hangs if journalPrefix is wrong.
Detail: The truncate_journal() in backup_functions.sh hangs if
journalPrefix is misconfigured.
There is a logic block in truncate_journal that is intended to wait
for a 'p4 -p $P4MASTERPORT admin journal' to fully complete processing
before the function returns. It does so by waiting for the numbered
journal file to appear in the checkpoints folder. This works as
intended when the journalPrefix is correct.
However, if the journalPrefix is wrong, the wait loop still occurs,
causing a hang waiting forever for a journal file that is never going
Updated job title line and description based on a new understanding of
An obvious fix should be to make the 'wait' loop occur only if the
journal rotation returns a happy zero exit code.
Digging deeper: Research to confirm that we really need the wait loop
at all. Is the 'p4 admin journal' just to request a journal rotation
be started, or does the return of the command guarantee that the
rotated journal file has landed in the checkpoints folder.