]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix#519 ub_ctx_delete may hang in some scenarios (libunbound).
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 19 Aug 2013 12:02:17 +0000 (12:02 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 19 Aug 2013 12:02:17 +0000 (12:02 +0000)
git-svn-id: file:///svn/unbound/trunk@2937 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libworker.c

index a911bad408f743da354f070744e43c4df361f859..ce1a0ff3d59caf43b421cecac1afbabcf41f4b0f 100644 (file)
@@ -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.
 
index bd61cea154a25356792790abf67715ba41921b17..dd3316d002511cf2fe448c75d43821b28abd8f31 100644 (file)
@@ -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 */