]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Reap the child process that libunbound spawns.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 13 Aug 2015 14:17:44 +0000 (14:17 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 13 Aug 2015 14:17:44 +0000 (14:17 +0000)
git-svn-id: file:///svn/unbound/trunk@3473 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libunbound.c

index b3ee0d765a5eee762108476815a1ffa346825e9f..35f67c113ba6ef9d4191d0b360749b7d04d81164 100644 (file)
@@ -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
index b3a4c2ba77f6c8ce86ca7dbf7eb18f177d37d5b4..7f034b8fedd634f7c4ef4f185d17f83c0413a66c 100644 (file)
@@ -65,6 +65,7 @@
 #ifdef HAVE_PTHREAD
 #include <signal.h>
 #endif
+#include <sys/wait.h>
 
 #if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H)
 #include <windows.h>
@@ -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 {