diff options
author | Jan Rybar <jrybar@redhat.com> | 2018-08-15 16:11:22 +0200 |
---|---|---|
committer | Jan Rybar <jrybar@redhat.com> | 2018-08-15 16:15:34 +0200 |
commit | 8638ec5cd534dcc616b68e5b0744c493c0c71dc9 (patch) | |
tree | b6238eb13792af705b3dc490d2b0012ca5779308 | |
parent | 542c6ec832919df6a74e16aba574adaeebe35e08 (diff) | |
download | polkit-8638ec5cd534dcc616b68e5b0744c493c0c71dc9.tar.gz |
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.
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp index 517f3c6..7602714 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp @@ -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; } |