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 {