From: Wouter Wijngaards Date: Thu, 13 Aug 2015 14:17:44 +0000 (+0000) Subject: - Reap the child process that libunbound spawns. X-Git-Tag: release-1.5.5rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6da360d3bbed45de33a73845e11c7a56024faaff;p=thirdparty%2Funbound.git - Reap the child process that libunbound spawns. git-svn-id: file:///svn/unbound/trunk@3473 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index b3ee0d765..35f67c113 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 13 August 2015: Wouter - 5011 implementation does not insist on all algorithms, when harden-algo-downgrade is turned off. + - Reap the child process that libunbound spawns. 11 August 2015: Wouter - Fix #694: configure script does not detect LibreSSL 2.2.2 diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index b3a4c2ba7..7f034b8fe 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -65,6 +65,7 @@ #ifdef HAVE_PTHREAD #include #endif +#include #if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H) #include @@ -218,6 +219,10 @@ static void ub_stop_bg(struct ub_ctx* ctx) ub_thread_join(ctx->bg_tid); } else { lock_basic_unlock(&ctx->cfglock); + if(waitpid(ctx->bg_pid, NULL, 0) == -1) { + if(verbosity > 2) + log_err("waitpid: %s", strerror(errno)); + } } } else {