aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-21 17:48:54 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-21 17:48:54 +0000
commit95af15ce8f7a9408bce9b27a29b4221113ee9dd4 (patch)
tree57ce2a3a03d4667e5d00cd7e36b306abe944f367
parent688166295a7975e9fa5ad5202105a5db5d6a629f (diff)
downloadmpd-95af15ce8f7a9408bce9b27a29b4221113ee9dd4.tar.gz
mpd-95af15ce8f7a9408bce9b27a29b4221113ee9dd4.tar.xz
mpd-95af15ce8f7a9408bce9b27a29b4221113ee9dd4.zip
Initialize more stuff before daemonizing so we exit properly on fatal errors
git-svn-id: https://svn.musicpd.org/mpd/trunk@4421 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 95e32c2d5..77591a35f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -358,6 +358,8 @@ static void startMainProcess(void)
/* we're killed */
playerKill();
+ finishPlaylist();
+
finishAudioConfig();
finishAudioDriver();
@@ -546,12 +548,13 @@ int main(int argc, char *argv[])
initPlayerData();
- daemonize(&options);
-
initInputPlugins();
initPaths();
initAudioConfig();
initAudioDriver();
+ initPlaylist();
+
+ daemonize(&options);
initSigHandlers();
setupLogOutput(&options, out, err);
@@ -562,8 +565,6 @@ int main(int argc, char *argv[])
initPermissions();
- initPlaylist();
-
openDB(&options, argv[0]);
initCommands();