summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2012-01-28 10:38:31 -0800
committerWayne Davison <wayned@samba.org>2012-01-28 10:42:01 -0800
commit0dfd2a64ec7c2ae1cfd9c97ec37b9d17c4c42977 (patch)
tree4368a8c1d24b8c687b7187e7240ed1458c9b9dff /options.c
parent6686b93a7ae3ad5732c29f173cd34e97f188975f (diff)
downloadrsync-0dfd2a64ec7c2ae1cfd9c97ec37b9d17c4c42977.tar.gz
Make stderr line-buffered w/--msgs2stderr.
Diffstat (limited to 'options.c')
-rw-r--r--options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/options.c b/options.c
index 5b2bfc1d..c556617d 100644
--- a/options.c
+++ b/options.c
@@ -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);