GNOME Bugzilla – Bug 682331
GApplication in Garbage Collected environments would benefit from a g_application_command_line_exit() to enable remote instances to exit.
Last modified: 2013-10-17 12:24:11 UTC
The behaviour of the "command line" capability in GApplication is defined as depending on the lifecycle of the GApplicationCommandLine object. This is challenging in memory-managed environments because we do not control when the last reference will be dropped by the runtime; although we may have dropped our last reference the runtime will be holding a weak (ie GToggleRef last_ref) reference count to the object, and it may be quite some time before the garbage collector runs to drop this last ref, leading to GObject disposal. g_application_command_line_exit() or so would allow us to indicated that we have finished processing the arguments, and more importantly, wish the remote to terminate. AfC
I dug into this old bug today and it's sort of difficult. The short story: the command-line handler should obviously call g_application_command_line_exit(), but what happens when that gets called in the case that the invoking instance is the primary instance? Surely we don't want to exit on the spot...
*** This bug has been marked as a duplicate of bug 708042 ***
*** Bug 708042 has been marked as a duplicate of this bug. ***