BIND 10 trac2831, updated. 3469f1a8757e2b49c29aa93513c64a5167dff400 [2831] Reset the parent's segment before forking
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Apr 12 14:29:35 UTC 2013
The branch, trac2831 has been updated
via 3469f1a8757e2b49c29aa93513c64a5167dff400 (commit)
via 408b43df795d7dbb4ee9d4a47cb3e4ae9ae1bba6 (commit)
from 52c3dae27c25e3aa3e32ae300013ddecec5ff190 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3469f1a8757e2b49c29aa93513c64a5167dff400
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Apr 12 19:59:23 2013 +0530
[2831] Reset the parent's segment before forking
Though we won't have two readers at the same time, it's best we
reset the segment so that it's not carried over for the child
to use accidentally.
commit 408b43df795d7dbb4ee9d4a47cb3e4ae9ae1bba6
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Apr 12 19:57:53 2013 +0530
[2831] Fix the segment that is used from the child
-----------------------------------------------------------------------
Summary of changes:
.../util/tests/memory_segment_mapped_unittest.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/tests/memory_segment_mapped_unittest.cc b/src/lib/util/tests/memory_segment_mapped_unittest.cc
index a94c853..80411b8 100644
--- a/src/lib/util/tests/memory_segment_mapped_unittest.cc
+++ b/src/lib/util/tests/memory_segment_mapped_unittest.cc
@@ -384,6 +384,7 @@ TEST_F(MemorySegmentMappedTest, multiProcess) {
ptr = segment_->getNamedAddress("test address");
ASSERT_TRUE(ptr);
EXPECT_EQ(424242, *static_cast<const uint32_t*>(ptr));
+ segment_.reset();
// Spawn another process and have it open and read the same data
int pipes[2];
@@ -393,7 +394,7 @@ TEST_F(MemorySegmentMappedTest, multiProcess) {
if (child_pid == 0) { // child
close(pipes[0]);
MemorySegmentMapped sgmt(mapped_file);
- void* ptr_child = segment_->getNamedAddress("test address");
+ void* ptr_child = sgmt.getNamedAddress("test address");
EXPECT_TRUE(ptr_child);
if (ptr_child) {
const uint32_t val = *static_cast<const uint32_t*>(ptr_child);
More information about the bind10-changes
mailing list