diff options
author | Wayne Davison <wayned@samba.org> | 2012-01-28 10:38:31 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2012-01-28 10:42:01 -0800 |
commit | 0dfd2a64ec7c2ae1cfd9c97ec37b9d17c4c42977 (patch) | |
tree | 4368a8c1d24b8c687b7187e7240ed1458c9b9dff /options.c | |
parent | 6686b93a7ae3ad5732c29f173cd34e97f188975f (diff) | |
download | rsync-0dfd2a64ec7c2ae1cfd9c97ec37b9d17c4c42977.tar.gz |
Make stderr line-buffered w/--msgs2stderr.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |