Description: consolekit fix for GLIB Critical Set source id to 0 after calling g_source_remove Avoids some GLIB-Critical runtime messages by properly resetting the source id variables after removing the source. Patch provided to ConsoleKit2 by Manfred Hampl. . consolekit (0.4.6-5ubuntu1) UNRELEASED; urgency=medium . * Made changes from https://github.com/ConsoleKit2/ConsoleKit2/commit/0b79d92001450e7f359212d4273100628f6a1693 Author: David Hines --- Origin: other, https://www.math.tamu.edu/~david/patch/glib-critical.patch Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/1614942 Reviewed-By: Last-Update: 2016-10-25 --- consolekit-0.4.6.orig/src/ck-job.c +++ consolekit-0.4.6/src/ck-job.c @@ -369,9 +369,11 @@ ck_job_finalize (GObject *object) if (job->priv->out_watch_id > 0) { g_source_remove (job->priv->out_watch_id); + job->priv->out_watch_id = 0; } if (job->priv->err_watch_id > 0) { g_source_remove (job->priv->err_watch_id); + job->priv->err_watch_id = 0; } g_free (job->priv->command); g_string_free (job->priv->std_out, TRUE); --- consolekit-0.4.6.orig/src/ck-run-programs.c +++ consolekit-0.4.6/src/ck-run-programs.c @@ -94,6 +94,7 @@ _child_watch (GPid pid, g_spawn_close_pid (pid); g_source_remove (cd->timeout_id); + cd->timeout_id = 0; cd->child_is_running = FALSE; --- consolekit-0.4.6.orig/src/ck-tty-idle-monitor.c +++ consolekit-0.4.6/src/ck-tty-idle-monitor.c @@ -171,6 +171,7 @@ remove_idle_hint_timeout (CkTtyIdleMonit { if (tty_idle_monitor->priv->timeout_id > 0) { g_source_remove (tty_idle_monitor->priv->timeout_id); + tty_idle_monitor->priv->timeout_id = 0; } } --- consolekit-0.4.6.orig/src/ck-vt-monitor.c +++ consolekit-0.4.6/src/ck-vt-monitor.c @@ -495,6 +495,7 @@ ck_vt_monitor_finalize (GObject *object) if (vt_monitor->priv->process_queue_id > 0) { g_source_remove (vt_monitor->priv->process_queue_id); + vt_monitor->priv->process_queue_id = 0; } if (vt_monitor->priv->event_queue != NULL) {