aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-13 19:08:38 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-13 19:08:38 +0000
commit860f8bda714da8724777e47829e751585b4ca288 (patch)
tree293daaf8f52314a9fe2b63fb7bb75c54909e42bc /src/directory.c
parent5a50fa7147be049212274534ccfbf7ed14708070 (diff)
downloadmpd-860f8bda714da8724777e47829e751585b4ca288.tar.gz
mpd-860f8bda714da8724777e47829e751585b4ca288.tar.xz
mpd-860f8bda714da8724777e47829e751585b4ca288.zip
ok, rework myfprintf so it uses write() and never use any file stream
print functions. this way we can always know wtf is going on! also, remove some places where we were using fprintf and printf instead of myfprintf git-svn-id: https://svn.musicpd.org/mpd/trunk@734 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/directory.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/directory.c b/src/directory.c
index ec0d24ba7..8f2765d26 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -553,7 +553,6 @@ int printDirectoryInfo(FILE * fp, char * name) {
return 0;
}
-/* DON'T BLOCK SIGNALS IN THIS FUNCTION, called by writeDirectoryDB() */
void writeDirectoryInfo(FILE * fp, Directory * directory) {
ListNode * node = (directory->subDirectories)->firstNode;
Directory * subDirectory;
@@ -685,17 +684,12 @@ int writeDirectoryDB() {
while(!(fp=fopen(directorydb,"w")) && errno==EINTR);
if(!fp) return -1;
- /* block signals so we ensure the db doesn't get corrupted */
- /* no functions that writeDirectoryInfoCalls should mess with
- signals or signal blocking! */
- blockSignals();
myfprintf(fp,"%s\n",DIRECTORY_INFO_BEGIN);
myfprintf(fp,"%s%s\n",DIRECTORY_MPD_VERSION,VERSION);
myfprintf(fp,"%s%s\n",DIRECTORY_FS_CHARSET,getFsCharset());
myfprintf(fp,"%s\n",DIRECTORY_INFO_END);
writeDirectoryInfo(fp,mp3rootDirectory);
- unblockSignals();
while(fclose(fp) && errno==EINTR);