mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-23 06:14:18 -04:00
set the exit code to RERR_FILEIO is io_error is set when we exit. This
catches most sorts of io errors and ensures we report a error in our exit status.
This commit is contained in:
1 parent
6fe076b3d7
commit
9bd6597666
1 file changed
+3
@@ -30,11 +30,14 @@ static struct file_struct *cleanup_file;
|
||||
static int cleanup_fd1, cleanup_fd2;
|
||||
static struct map_struct *cleanup_buf;
|
||||
static int cleanup_pid = 0;
|
||||
extern int io_error;
|
||||
|
||||
void _exit_cleanup(int code, const char *file, int line)
|
||||
{
|
||||
extern int keep_partial;
|
||||
|
||||
if (code == 0 && io_error) code = RERR_FILEIO;
|
||||
|
||||
signal(SIGUSR1, SIG_IGN);
|
||||
|
||||
if (cleanup_got_literal && cleanup_fname && keep_partial) {
|
||||
|
||||
Reference in new issue
Block a user