That's because when you comment out the mainloop the process exits before the dbus message can be sent. If you replace it with a "sleep(100)" it should work (for some reason I can't get it to compile).
That's because when you comment out the mainloop the process exits before the dbus message can be sent. If you replace it with a "sleep(100)" it should work (for some reason I can't get it to compile).