Commit 8638ec5c authored by Jan Rybar's avatar Jan Rybar

Leaking zombie child processes

Resolves: bz#106021

Subject: [PATCH] polkitd: fix zombie not reaped when js spawned process timed
 out

The child watch source attached to thread context didn't work due
to the release of it's main loop and context outside. So we attach
the source to the global default main context to make it work and
avoid zombies.
parent 542c6ec8
......@@ -1595,7 +1595,8 @@ utils_spawn_data_free (UtilsSpawnData *data)
(GSourceFunc) utils_child_watch_from_release_cb,
source,
(GDestroyNotify) g_source_destroy);
g_source_attach (source, data->main_context);
/* attach source to the global default main context */
g_source_attach (source, NULL);
g_source_unref (source);
data->child_pid = 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment