Comment 4 for bug 987707

Revision history for this message
Jason Conti (jconti) wrote :

After thinking about it a bit more, I figured out why we can't connect with gdbus after the fork. GDBus uses a separate thread to send and receive the message, which is only initialized once in gdbusprivate.c:_g_dbus_shared_thread_ref, guarded by the call to g_once_init_enter. After the fork, that thread is gone, so when we try to connect, no messages are sent or received, and we time out.

This can be seen by running gvim in gdb. After the fork, if you zero out shared_thread_data and ensured_classes (to avoid an abort), gvim will load right up and ibus will be working.

So I guess the only sane way to fix this on gvim's side would be to move the gtk_init_check to after the fork (although it seems gvim uses that to determine if it needs to fallback to text mode, so that may break other things).