From: Andre Noll Date: Thu, 6 Nov 2008 09:32:01 +0000 (+0100) Subject: Prevent busy loops on rsync exit code 13. X-Git-Tag: v0.1.1~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=38241adb35761475ac010eca4ac1141f3fee79a8;p=dss.git Prevent busy loops on rsync exit code 13. We restart the rsync process in case it returned with exit code 13 which unfortunately happens for some unknown reasons even with a valid configuration. This may lead to a busy loop, so wait at least one minute before restarting rsync. --- diff --git a/dss.c b/dss.c index 86e8382..af02f1c 100644 --- a/dss.c +++ b/dss.c @@ -502,6 +502,8 @@ static int handle_rsync_exit(int status) DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n", (int)rsync_pid, es); snapshot_creation_status = SCS_RSYNC_NEEDS_RESTART; + gettimeofday(&next_snapshot_time, NULL); + next_snapshot_time.tv_sec += 60; ret = 1; goto out; }