summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorAndreas Färber <andreas.faerber@web.de>2011-10-31 19:14:56 +0100
committerAndreas Färber <andreas.faerber@web.de>2011-11-01 20:41:06 +0100
commitdb529aabfac17201d3647384abf89fc7f272b493 (patch)
treecbdf7ccbeb66de77059de7b28332ef70435dd412 /vl.c
parent351f1bf6fc9f02cd2ef341f853f7bb55d05974ec (diff)
vl.c: Guard against GThread double-initialization
GThread-ERROR **: GThread system may only be initialized once. aborting... Making the g_thread_init() call in vl.c conditional resolves an abort on Mac OS X, where coroutine-gthread.c seems to call it before vl.c. Reported-by: Juan Pineda <juan@logician.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index b56e0cb378..624da0fd3c 100644
--- a/vl.c
+++ b/vl.c
@@ -2185,7 +2185,9 @@ int main(int argc, char **argv, char **envp)
error_set_progname(argv[0]);
g_mem_set_vtable(&mem_trace);
- g_thread_init(NULL);
+ if (!g_thread_supported()) {
+ g_thread_init(NULL);
+ }
runstate_init();