Commit 30abef47 authored by Darko Poljak's avatar Darko Poljak

Delete in background and finally wait for children

parent ca6d06c2
......@@ -711,7 +711,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
if [ "$ret" -eq 0 ]; then
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
if [ -f "${c_delete_incomplete}" ]; then
delete_from_file "${TMP}" "${CMARKER}"
delete_from_file "${TMP}" "${CMARKER}" &
fi
fi
......@@ -729,7 +729,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
ls -${TSORT}1r | grep "^${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \
_exit_err "Listing old backups failed"
delete_from_file "${TMP}"
delete_from_file "${TMP}" &
fi
#
......@@ -820,6 +820,9 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
_techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)"
unlock "${name}"
# wait for children (doing delete_from_file) if any still running
wait
) || exit
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment