aboutsummaryrefslogtreecommitdiffstats
path: root/src/myfprintf.c
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2005-11-18 12:09:05 +0000
committerQball Cow <qball@qballcow.nl>2005-11-18 12:09:05 +0000
commit4b00c62587dbe0ce131992dcd574ffe323cffa5c (patch)
tree231924d4c2fb4eb916c3a02ed1fc505e42081e58 /src/myfprintf.c
parent32e5f4ca2b43c310ff6639320dec2dd52f159f50 (diff)
downloadmpd-4b00c62587dbe0ce131992dcd574ffe323cffa5c.tar.gz
mpd-4b00c62587dbe0ce131992dcd574ffe323cffa5c.tar.xz
mpd-4b00c62587dbe0ce131992dcd574ffe323cffa5c.zip
DJWLindenaar's fix race condition and some memory leaks patch
git-svn-id: https://svn.musicpd.org/mpd/trunk@3681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/myfprintf.c')
-rw-r--r--src/myfprintf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c
index a959b6609..c333e9c7f 100644
--- a/src/myfprintf.c
+++ b/src/myfprintf.c
@@ -122,3 +122,10 @@ int myfprintfCloseAndOpenLogFile() {
return 0;
}
+
+void myfprintfCloseLogFile() {
+ if(myfprintf_stdLogMode) {
+ while(fclose(myfprintf_out)<0 && errno==EINTR);
+ while(fclose(myfprintf_err)<0 && errno==EINTR);
+ }
+}