summaryrefslogtreecommitdiff
path: root/cleanup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-22 07:36:51 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-22 07:36:51 +0000
commitff81e809f46293171a332a2faa320aca57277b4b (patch)
treebf4d165b7a24029b531567cbbe92ecc94ceba997 /cleanup.c
parentfd2dd2aa231954db2bcc0b60f2a696bc38161aa9 (diff)
downloadrsync-ff81e809f46293171a332a2faa320aca57277b4b.tar.gz
rsync-ff81e809f46293171a332a2faa320aca57277b4b.tar.bz2
rsync-ff81e809f46293171a332a2faa320aca57277b4b.zip
new error handling system
we now give a non-0 exit code if *any* of the files we have been asked to transfer fail to transfer
Diffstat (limited to 'cleanup.c')
-rw-r--r--cleanup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cleanup.c b/cleanup.c
index bd562ae6..4b9cad3a 100644
--- a/cleanup.c
+++ b/cleanup.c
@@ -40,6 +40,7 @@ extern int io_error;
void _exit_cleanup(int code, const char *file, int line)
{
extern int keep_partial;
+ extern int log_got_error;
if (code == 0 && io_error) code = RERR_FILEIO;
@@ -69,6 +70,12 @@ void _exit_cleanup(int code, const char *file, int line)
if (code) log_exit(code, file, line);
+ if (code == 0) {
+ if (log_got_error) {
+ code = RERR_FILEIO;
+ }
+ }
+
exit(code);
}