+ //printf("(4)");
+
+
+ while (1) {
+ FD_ZERO(&readSet);
+ FD_SET(fd_out, &readSet);
+
+ //printf("(5)");
+ res = select(fd_out + 1, &readSet, NULL, NULL, NULL);
+ //printf("(6)");
+ if (res < 0) {
+ if (errno == EINTR || errno == EAGAIN) {
+ printf(".");
+ continue;
+ }
+ fprintf(stderr,"select failed errno=%d errstr=%s\n", errno, strerror(errno));
+ exit(-1);
+ }
+ break; /* we're done */
+ }