diff options
author | 2010-11-13 16:07:51 +0000 | |
---|---|---|
committer | 2010-11-13 16:07:51 +0000 | |
commit | 7a4f916615342108ec72e9631982c71b5b8b36e3 (patch) | |
tree | 1da259a3e6561a1433d1e37443fd54fc2b1c72f2 | |
parent | a7cc5075fe92a40600abe338801e293727f99c15 (diff) | |
download | paludis-7a4f916615342108ec72e9631982c71b5b8b36e3.tar.gz paludis-7a4f916615342108ec72e9631982c71b5b8b36e3.tar.xz |
Make TeeOutputStream flush
-rw-r--r-- | paludis/util/tee_output_stream.cc | 9 | ||||
-rw-r--r-- | paludis/util/tee_output_stream.hh | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/paludis/util/tee_output_stream.cc b/paludis/util/tee_output_stream.cc index 32899685b..d179318f8 100644 --- a/paludis/util/tee_output_stream.cc +++ b/paludis/util/tee_output_stream.cc @@ -50,6 +50,15 @@ TeeOutputStreamBuf::overflow(int_type c) return c; } +int +TeeOutputStreamBuf::sync() +{ + for (std::list<std::ostream *>::iterator i(_imp->streams.begin()), i_end(_imp->streams.end()) ; + i != i_end ; ++i) + **i << std::flush; + return 0; +} + std::streamsize TeeOutputStreamBuf::xsputn(const char * s, std::streamsize num) { diff --git a/paludis/util/tee_output_stream.hh b/paludis/util/tee_output_stream.hh index c464e97b9..cf01beed6 100644 --- a/paludis/util/tee_output_stream.hh +++ b/paludis/util/tee_output_stream.hh @@ -35,6 +35,8 @@ namespace paludis virtual int_type overflow(int_type c); + virtual int sync(); + virtual std::streamsize xsputn(const char * s, std::streamsize num); |