aboutsummaryrefslogtreecommitdiffstats
path: root/src/IOThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-03 11:28:47 +0200
committerMax Kellermann <max@duempel.org>2013-09-03 11:28:47 +0200
commit4db119c01b1c9a10a070a2b23a3d43ca2dc722c5 (patch)
tree3f28777c86cd588df4c29569afe17d0f803fb10b /src/IOThread.cxx
parentbbd711556476d5ef3510678a5e525974821803b2 (diff)
downloadmpd-4db119c01b1c9a10a070a2b23a3d43ca2dc722c5.tar.gz
mpd-4db119c01b1c9a10a070a2b23a3d43ca2dc722c5.tar.xz
mpd-4db119c01b1c9a10a070a2b23a3d43ca2dc722c5.zip
IOThread: use FatalError() on g_thread_create() error
New GLib versions don't fail.
Diffstat (limited to 'src/IOThread.cxx')
-rw-r--r--src/IOThread.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/IOThread.cxx b/src/IOThread.cxx
index cba9c9263..f615b0491 100644
--- a/src/IOThread.cxx
+++ b/src/IOThread.cxx
@@ -23,6 +23,8 @@
#include "thread/Cond.hxx"
#include "event/Loop.hxx"
+#include <glib.h>
+
#include <assert.h>
static struct {
@@ -63,8 +65,8 @@ io_thread_init(void)
io.loop = new EventLoop();
}
-bool
-io_thread_start(gcc_unused GError **error_r)
+void
+io_thread_start()
{
assert(io.loop != NULL);
assert(io.thread == NULL);
@@ -76,10 +78,8 @@ io_thread_start(gcc_unused GError **error_r)
#else
io.thread = g_thread_create(io_thread_func, NULL, true, error_r);
if (io.thread == NULL)
- return false;
+ FatalError();
#endif
-
- return true;
}
void