From: Wouter Wijngaards Date: Mon, 19 Aug 2013 12:02:17 +0000 (+0000) Subject: - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound). X-Git-Tag: release-1.4.21^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64e8486a6dbd4ce63e690d905bf7bf7b3531c961;p=thirdparty%2Funbound.git - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound). git-svn-id: file:///svn/unbound/trunk@2937 be551aaa-1e26-0410-a405-d3ace91eadb9 --- 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 */