Comment 13 for bug 1303649

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Actually the source of the problem is that I was calling nih_dbus_setup(), which actually sets up the mainloop. It is not needed - as I thought it was - for making *_sync calls from cgmanager-client.so. So the right fix is to not call that.

Two comments on this. First, nih_dbus_setup() seems misleadingly named, though that may just be how I read it. The comments above that function are plenty clear and I should have seen those.

Second, the default nih dbus connection is a shared one, which always does nih_dbus_setup(). So for anyone to use libcgmanager without a nih mainloop, they *must* use the dbus_connection_open_private(). We should probably mention that somewhere in the libcgmanager documentation.