Change daemon variable & simplify some option code
[rsync.git] / io.c
diff --git a/io.c b/io.c
index fe4a8778b75653cd1e882637ee6c758d99d35d09..b50a066cf31928acb86d175d6595580a70d18b28 100644 (file)
--- a/io.c
+++ b/io.c
@@ -54,6 +54,7 @@ extern int read_batch;
 extern int compat_flags;
 extern int protect_args;
 extern int checksum_seed;
+extern int daemon_connection;
 extern int protocol_version;
 extern int remove_source_files;
 extern int preserve_hard_links;
@@ -917,7 +918,11 @@ void noop_io_until_death(void)
 {
        char buf[1024];
 
-       if (!iobuf.in.buf || !iobuf.out.buf || iobuf.in_fd < 0 || iobuf.out_fd < 0 || kluge_around_eof || msgs2stderr)
+       if (!iobuf.in.buf || !iobuf.out.buf || iobuf.in_fd < 0 || iobuf.out_fd < 0 || kluge_around_eof)
+               return;
+
+       /* If we're talking to a daemon over a socket, don't short-circuit this logic */
+       if (msgs2stderr && daemon_connection >= 0)
                return;
 
        kluge_around_eof = 2;