After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
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: RESOLVED OBSOLETE
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:
 
 
Reported: 2012-08-21 06:30 UTC by Andrew Cowie
Modified: 2018-05-24 14:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



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 Karlitskaya (desrt) 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 Karlitskaya (desrt) 2013-10-17 12:24:11 UTC
*** Bug 708042 has been marked as a duplicate of this bug. ***
Comment 4 GNOME Infrastructure Team 2018-05-24 14:29:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/596.