summaryrefslogtreecommitdiff
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-03-05 11:13:42 +0100
committerMax Kellermann <max@musicpd.org>2018-03-05 11:13:42 +0100
commit5b0e8c6de0b73d8e8812cbf4588862fed2a2af42 (patch)
treef6791e79ebaa7c534ae812abdcbdb9946e56daa8 /src/Main.cxx
parent67274c018d1872a24a54c1d0c9753b629833a8f5 (diff)
parent8266ab5588ccca25b0b8b09e970736898159e73f (diff)
Merge branch 'v0.20.x'
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index fce8dc06e..19b18f7a4 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -107,10 +107,6 @@
#include <locale.h>
#endif
-#ifdef __BLOCKS__
-#include <dispatch/dispatch.h>
-#endif
-
#include <limits.h>
static constexpr size_t KILOBYTE = 1024;
@@ -536,21 +532,8 @@ try {
daemonize_begin(options.daemon);
#endif
-#ifdef __BLOCKS__
- /* Runs the OS X native event loop in the main thread, and runs
- the rest of mpd_main on a new thread. This lets CoreAudio receive
- route change notifications (e.g. plugging or unplugging headphones).
- All hardware output on OS X ultimately uses CoreAudio internally.
- This must be run after forking; if dispatch is called before forking,
- the child process will have a broken internal dispatch state. */
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- exit(mpd_main_after_fork(config));
- });
- dispatch_main();
- return EXIT_FAILURE; // unreachable, because dispatch_main never returns
-#else
return mpd_main_after_fork(config);
-#endif
+
} catch (const std::exception &e) {
LogError(e);
return EXIT_FAILURE;