diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-03-22 07:36:51 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-03-22 07:36:51 +0000 |
commit | ff81e809f46293171a332a2faa320aca57277b4b (patch) | |
tree | bf4d165b7a24029b531567cbbe92ecc94ceba997 /cleanup.c | |
parent | fd2dd2aa231954db2bcc0b60f2a696bc38161aa9 (diff) | |
download | rsync-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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); } |