From 64e8486a6dbd4ce63e690d905bf7bf7b3531c961 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 19 Aug 2013 12:02:17 +0000 Subject: [PATCH] - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound). git-svn-id: file:///svn/unbound/trunk@2937 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 3 +++ libunbound/libworker.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index a911bad40..ce1a0ff3d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +19 Aug 2013: Wouter + - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound). + 14 Aug 2013: Wouter - Fix uninit variable in fix#516. diff --git a/libunbound/libworker.c b/libunbound/libworker.c index bd61cea15..dd3316d00 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -372,6 +372,11 @@ int libworker_bg(struct ub_ctx* ctx) case -1: return UB_FORKFAIL; default: + /* close non-used parts, so that the worker + * bgprocess gets 'pipe closed' when the + * main process exits */ + tube_close_read(ctx->qq_pipe); + tube_close_write(ctx->rr_pipe); break; } #endif /* HAVE_FORK */