Page MenuHome GnuPG

555_0001-dirmngr-Clean-up-spawned-dirmngr_ldap-processes.patch
AbandonedPublic

Authored by aheinecke on Feb 17 2015, 6:16 PM.

Details

Reviewers
None
Summary

From 65b1d5a72a2b963ddfb479825319390b57ef85e2 Mon Sep 17 00:00:00 2001
From: Andre Heinecke <aheinecke@intevation.de>
Date: Tue, 17 Feb 2015 18:07:14 +0100
Subject: [PATCH] dirmngr: Clean up spawned dirmngr_ldap processes

  • dirmngr/ldap-wrapper.c (destroy_process): New. (destroy_wrapper, ldap_wrapper_thread), (ldap_wrapper_connection_cleanup): Use destroy_process instead of gnupg_kill_process. (ldap_wrapper): Call destory_process in error cases. (ldap_wrapper_release_context): destroy_process on release.

When spawning a process with gnupg_process_spawn the caller
is required to clean up the process with gnupg_kill_process
and gnupg_release_process to avoid ressource leaks / zombie
processes. This is done now in a small cleanup function
that kills a process and cleans up after it.

GnuPG-bug-id: 1838

dirmngr/ldap-wrapper.c | 40 ++++++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 8 deletions(-)

1.9.1

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped