cerr<<"Watching "<<mplexer->getWatchedFDCount(false)<<" FDs for read and "<<mplexer->getWatchedFDCount(true)<<" for write"<<endl;
cerr<<"pipes[0] is "<<pipes[0]<<endl;
cerr<<"pipes[1] is "<<pipes[1]<<endl;
- cerr<<"The file descripttor returned as ready is "<<readyFDs.at(0)<<endl;
+ cerr<<"The file descriptor returned as ready is "<<readyFDs.at(0)<<endl;
char buffer[2];
- ssize_t res = read(pipes[0], &buffer[0], sizeof(buffer));
+ ssize_t res = write(pipes[1], "0", 1);
int saved = errno;
- cerr<<"Reading from pipes[0] returns "<<res<<endl;
+ cerr<<"Writing to pipes[1] returns "<<res<<endl;
if (res == -1) {
cerr<<"errno is "<<saved<<endl;
}
- res = write(pipes[1], "0", 1);
+ res = read(pipes[0], &buffer[0], sizeof(buffer));
saved = errno;
- cerr<<"Writing to pipes[1] returns "<<res<<endl;
+ cerr<<"Reading from pipes[0] returns "<<res<<endl;
if (res == -1) {
cerr<<"errno is "<<saved<<endl;
}
}
- BOOST_REQUIRE_EQUAL(readyFDs.size(), 2);
+ BOOST_CHECK_EQUAL(readyFDs.size(), 2);
readCBCalled = false;
writeCBCalled = false;