summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-10-12 09:03:42 -0700
committerWayne Davison <wayned@samba.org>2009-10-12 09:10:50 -0700
commit41000dffc1e98a2f9fb19550f2c6bfc5f6290137 (patch)
treeb55d9434f5855e1d54bfc0273db028a3e16c3fc5 /main.c
parentd8587b4690b1987c02c71c136720f366abf250e6 (diff)
downloadrsync-41000dffc1e98a2f9fb19550f2c6bfc5f6290137.tar.gz
Avoid stopping multiplexed out over the message fd.
Use simpler multiplexed-out stopping method. Make sure we can't false-match a socket fd.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index d8055cb6..ecae742a 100644
--- a/main.c
+++ b/main.c
@@ -63,6 +63,8 @@ extern int whole_file;
extern int read_batch;
extern int write_batch;
extern int batch_fd;
+extern int sock_f_in;
+extern int sock_f_out;
extern int filesfrom_fd;
extern int connect_timeout;
extern pid_t cleanup_child_pid;
@@ -841,6 +843,7 @@ static int do_recv(int f_in, int f_out, char *local_name)
close(error_pipe[0]);
if (f_in != f_out)
close(f_out);
+ sock_f_out = -1;
/* we can't let two processes write to the socket at one time */
io_end_multiplex_out();
@@ -891,6 +894,7 @@ static int do_recv(int f_in, int f_out, char *local_name)
close(error_pipe[1]);
if (f_in != f_out)
close(f_in);
+ sock_f_in = -1;
io_start_buffering_out(f_out);