Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't write more than PIPE_BUF bytes in any one write() in io.c
[rsync/rsync.git]
/
cleanup.c
diff --git
a/cleanup.c
b/cleanup.c
index
be79503
..
b4ac82a
100644
(file)
--- a/
cleanup.c
+++ b/
cleanup.c
@@
-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;
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;
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) {
signal(SIGUSR1, SIG_IGN);
if (cleanup_got_literal && cleanup_fname && keep_partial) {