aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-06-29 18:41:02 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-06-29 18:41:02 +0000
commit54e6b27989733cdb3c3f23193ea300fd6c381978 (patch)
tree890eb52835e23ea54d6f4b2f457fda14253a8146 /src
parent5a2f854914cfb41be0ad9b7fa1eba4e43c2d5dc8 (diff)
downloadmpd-54e6b27989733cdb3c3f23193ea300fd6c381978.tar.gz
mpd-54e6b27989733cdb3c3f23193ea300fd6c381978.tar.xz
mpd-54e6b27989733cdb3c3f23193ea300fd6c381978.zip
log: flush the warning log after redirecting stderr to the log files
Previously, the warning log was only flushed if creating the db or logging to stdout. This meant that under normal circumstances (no db creation, logging to files) the warning log was never flushed. This caused a bug when a warning was printed for each call to the status command where the warning buffer would grow endlessly, eventually using more and more CPU to reallocate it. git-svn-id: https://svn.musicpd.org/mpd/trunk@6660 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index fa4ae64f0..7701da3a5 100644
--- a/src/log.c
+++ b/src/log.c
@@ -175,6 +175,7 @@ void setup_log_output(const int use_stdout)
if (!use_stdout) {
redirect_logs();
stdout_mode = 0;
+ flushWarningLog();
}
redirect_stdin();
}