Lines Matching refs:fd
14 int fd = *((int*)data);
16 close(fd);
17 fprintf(stderr, "fd %d closed\n", fd);
25 int fd = dup(0);
27 thread_id thread = spawn_thread(close_fd, "close fd", B_NORMAL_PRIORITY,
28 &fd);
34 FD_SET(fd, &readSet);
36 fprintf(stderr, "select({0, %d}, NULL, NULL, NULL) ...\n", fd);
37 int result = select(fd + 1, &readSet, NULL, NULL, NULL);
40 fprintf(stderr, "fd %d: %s\n", 0, FD_ISSET(0, &readSet) ? "r" : " ");
41 fprintf(stderr, "fd %d: %s\n", fd, FD_ISSET(fd, &readSet) ? "r" : " ");