summaryrefslogtreecommitdiff
blob: f7b1f681f449edbbfab73bcaf8fe9510bf38a1b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -urN rsync-2.5.2/io.c rsync-2.5.2-fixed/io.c
--- rsync-2.5.2/io.c	Fri Jan 25 16:01:50 2002
+++ rsync-2.5.2-fixed/io.c	Fri Mar  1 00:06:31 2002
@@ -442,6 +442,8 @@
 			}
 
 			if (ret <= 0) {
+				/* Don't try to write errors back across the stream */
+				io_multiplexing_close();
 				rprintf(FERROR,
 					"error writing %d unbuffered bytes"
 					" - exiting: %s\n", len,
diff -urN rsync-2.5.2/main.c rsync-2.5.2-fixed/main.c
--- rsync-2.5.2/main.c	Fri Jan 25 03:07:41 2002
+++ rsync-2.5.2-fixed/main.c	Fri Mar  1 00:06:31 2002
@@ -835,10 +835,12 @@
 	}
 
 	signal(SIGINT,SIGNAL_CAST sig_int);
-	signal(SIGPIPE,SIGNAL_CAST sig_int);
 	signal(SIGHUP,SIGNAL_CAST sig_int);
 	signal(SIGTERM,SIGNAL_CAST sig_int);
 
+	/* Ignore SIGPIPE; we check error codes consistently. */
+	signal(SIGPIPE,SIG_IGN);
+
 	/* Initialize push_dir here because on some old systems getcwd
 	   (implemented by forking "pwd" and reading its output) doesn't
 	   work when there are other child processes.  Also, on all systems