#include #include #include #include #include int main(int argc, char **argv) { fd_set fds; int s; FD_ZERO(&fds); s = socket(AF_INET, SOCK_STREAM, 0); FD_SET(s, &fds); close(s); // sleep(1); printf("got %d\n", select(s + 1, &fds, NULL, NULL, NULL));; printf("errno %d\n", errno); }