Bug 682331 - GApplication in Garbage Collected environments would benefit from a g_application_command_line_exit() to enable remote instances to exit.
GApplication in Garbage Collected environments would benefit from a g_applica...
Status: NEW
Product: glib
Classification: Platform
Component: gapplication
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
:
: 708042 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-08-21 06:30 UTC by Andrew Cowie
Modified: 2013-10-17 12:24 UTC (History)
3 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments

Description Andrew Cowie 2012-08-21 06:30:28 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
Comment 1 Allison Lortie (desrt) (extended vacation) 2012-11-06 18:13:13 UTC
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...
Comment 2 Matthias Clasen 2013-10-17 03:05:30 UTC

*** This bug has been marked as a duplicate of bug 708042 ***
Comment 3 Allison Lortie (desrt) (extended vacation) 2013-10-17 12:24:11 UTC
*** Bug 708042 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.