summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ForkedBroker.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-03 03:21:00 +0000
committerAlan Conway <aconway@apache.org>2008-09-03 03:21:00 +0000
commit3fa3e024eebc86ae47765f3f3319d15ca826dd73 (patch)
treef46b14142fa760be2b3f2ab3b007038ec89ee600 /qpid/cpp/src/tests/ForkedBroker.h
parentc442c23e21c2d18feb745d6e55811b60c7ba4b1d (diff)
downloadqpid-python-3fa3e024eebc86ae47765f3f3319d15ca826dd73.tar.gz
Cluster multicasts buffers rather than frames.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@691489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ForkedBroker.h')
-rw-r--r--qpid/cpp/src/tests/ForkedBroker.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/ForkedBroker.h b/qpid/cpp/src/tests/ForkedBroker.h
index 07e69a0735..cc8714bf23 100644
--- a/qpid/cpp/src/tests/ForkedBroker.h
+++ b/qpid/cpp/src/tests/ForkedBroker.h
@@ -85,7 +85,10 @@ class ForkedBroker {
::close(pipeFds[1]);
FILE* f = ::fdopen(pipeFds[0], "r");
if (!f) throw ErrnoException("fopen failed");
- if (::fscanf(f, "%d", &port) != 1) throw ErrnoException("ill-formatted port");
+ if (::fscanf(f, "%d", &port) != 1) {
+ if (ferror(f)) throw ErrnoException("Error reading port number from child.");
+ else throw qpid::Exception("EOF reading port number from child.");
+ }
}
else { // child
::close(pipeFds[0]);