return;
}
+ if (!setNonBlocking(pipefds[0])) {
+ close(pipefds[0]);
+ close(pipefds[1]);
+ errlog("Error setting the TCP thread communication pipe non-blocking: %s", strerror(errno));
+ return;
+ }
+
if (!setNonBlocking(pipefds[1])) {
close(pipefds[0]);
close(pipefds[1]);
if (pipe(d_singlePipe) < 0) {
throw std::runtime_error("Error creating the TCP single communication pipe: " + string(strerror(errno)));
}
+
+ if (!setNonBlocking(d_singlePipe[0])) {
+ int err = errno;
+ close(d_singlePipe[0]);
+ close(d_singlePipe[1]);
+ throw std::runtime_error("Error setting the TCP single communication pipe non-blocking: " + string(strerror(err)));
+ }
+
if (!setNonBlocking(d_singlePipe[1])) {
int err = errno;
close(d_singlePipe[0]);