summaryrefslogtreecommitdiff
path: root/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
commite8f6b7cd234088e7c33e42eb10e29719ea8e8aa9 (patch)
tree2d7df29ebba337fbbe28aa7716f0e32ff9e24c70 /cpp/src/tests/ForkedBroker.h
parent05b6583dc0d080d6bc5a0cca09218bb045090daf (diff)
downloadqpid-python-e8f6b7cd234088e7c33e42eb10e29719ea8e8aa9.tar.gz
Cluster multicasts buffers rather than frames.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@691489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/ForkedBroker.h')
-rw-r--r--cpp/src/tests/ForkedBroker.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/tests/ForkedBroker.h b/cpp/src/tests/ForkedBroker.h
index 07e69a0735..cc8714bf23 100644
--- a/cpp/src/tests/ForkedBroker.h
+++ b/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]);