Make stderr line-buffered w/--msgs2stderr.

This commit is contained in:
Wayne Davison
2012-01-28 10:38:31 -08:00
parent 6686b93a7a
commit 0dfd2a64ec
2 changed files with 9 additions and 0 deletions

View File

@@ -1852,6 +1852,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
setvbuf(stdout, (char *)NULL, mode, 0);
}
if (msgs2stderr) {
/* Make stderr line buffered for better sharing of the stream. */
fflush(stderr); /* Just in case... */
setvbuf(stderr, (char *)NULL, _IOLBF, 0);
}
#endif
set_output_verbosity(verbose, DEFAULT_PRIORITY);

View File

@@ -565,6 +565,9 @@ messages back to the client side, so if you are doing any daemon-transfer
debugging using this option, you should start up a daemon using bf(--no-detach)
so that you can see the stderr output on the daemon side.
This option has the side-effect of making stderr output get line-buffered so
that the merging of the output of 3 programs happens in a more readable manner.
dit(bf(-q, --quiet)) This option decreases the amount of information you
are given during the transfer, notably suppressing information messages
from the remote server. This option is useful when invoking rsync from