mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-10-28 10:06:16 +01:00
unreference source, attach child_watch to worker_context
This commit is contained in:
parent
1ef0fde037
commit
4ee3e2012a
@ -797,8 +797,15 @@ g_dbus_address_connect (const gchar *address_entry,
|
||||
g_spawn_close_pid (child_pid);
|
||||
goto out;
|
||||
}
|
||||
GSource* source;
|
||||
GMainContext *worker_context;
|
||||
|
||||
ret = (GIOStream *) g_socket_connection_factory_create_connection (fdsocket);
|
||||
g_child_watch_add (child_pid, unixexec_child_watch, ret);
|
||||
worker_context = GLIB_PRIVATE_CALL (g_get_worker_context) ();
|
||||
source = g_child_watch_source_new (child_pid);
|
||||
g_source_set_callback (source, unixexec_child_watch, ret, g_object_unref);
|
||||
g_source_attach (source, worker_context);
|
||||
g_source_unref(source);
|
||||
g_free (argv);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user