From: Andre Noll Date: Fri, 29 May 2009 11:49:13 +0000 (+0200) Subject: Restart rsync also on exit value 12. X-Git-Tag: v0.1.3~10 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=f05ae914bb3563ee657e4261ad0a7a8e80e8e9e7 Restart rsync also on exit value 12. An exit value of 12 means "Error in rsync protocol data stream", and it happens regularly for rsync-3 without apparent reason. So restart the rsync process also in this case. --- diff --git a/dss.c b/dss.c index 27c14b6..a9cdb3b 100644 --- a/dss.c +++ b/dss.c @@ -641,7 +641,12 @@ static int handle_rsync_exit(int status) goto out; } es = WEXITSTATUS(status); - if (es == 13) { /* Errors with program diagnostics */ + /* + * Restart rsync on non-fatal errors: + * 12: Error in rsync protocol data stream + * 13: Errors with program diagnostics + */ + if (es == 12 || es == 13) { DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n", (int)create_pid, es); snapshot_creation_status = HS_NEEDS_RESTART;