Permalink
Browse files

MessageChannel unit test: check for pipe creation failures

  • Loading branch information...
FooBarWidget committed Apr 20, 2008
1 parent dfc09b7 commit ddce16b124b8f8b1abd03916b62cfc3cac7fdacd
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/MessageChannelTest.cpp
@@ -17,7 +17,9 @@ namespace tut {
int p[2];
MessageChannelTest() {
- pipe(p);
+ if (pipe(p) != 0) {
+ throw SystemException("Cannot create a pipe", errno);
+ }
reader = MessageChannel(p[0]);
writer = MessageChannel(p[1]);
}

0 comments on commit ddce16b

Please sign in to comment.