aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-19 03:31:25 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-19 03:31:25 -0700
commit548385ac6cc0bc344762e19117f94258e7ea2251 (patch)
treedcd2bae159f63d7a234d3ff740402aceea47dfcf /src/main.c
parent3befb84a6a7a95de7e0e94c2f0bd9936ecb60668 (diff)
downloadmpd-548385ac6cc0bc344762e19117f94258e7ea2251.tar.gz
mpd-548385ac6cc0bc344762e19117f94258e7ea2251.tar.xz
mpd-548385ac6cc0bc344762e19117f94258e7ea2251.zip
fix output buffer deadlock when daemonizing
We spawned the output buffer thread before daemonizing in initPlayerData(), which is ultra bad because daemonizes forks and threads are not preserved on exit. Since playerData has been stripped bare by this core-rewrite anyways, move this code into the outputBuffer_* group and drop playerData.[ch] completely I completely forgot to test this :<
Diffstat (limited to '')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e02085294..239296501 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,7 +23,6 @@
#include "listen.h"
#include "conf.h"
#include "path.h"
-#include "playerData.h"
#include "stats.h"
#include "sig_handlers.h"
#include "audio.h"
@@ -412,7 +411,7 @@ int main(int argc, char *argv[])
openDB(&options, argv[0]);
initCommands();
- initPlayerData();
+ config_output_buffer();
initAudioConfig();
initAudioDriver();
initVolume();
@@ -424,6 +423,7 @@ int main(int argc, char *argv[])
daemonize(&options);
init_main_notify();
+ init_output_buffer();
setup_log_output(options.stdOutput);
initSigHandlers();