1 #include <sys/select.h>
7 select_thread (void *in)
9 pthread_setname_np ("select thread");
11 FD_SET (STDIN_FILENO, &fdset);
13 select (2, &fdset, NULL, NULL, NULL);
20 sleep(1); // break here
25 pthread_setname_np ("main thread");
26 pthread_t other_thread;
27 pthread_create (&other_thread, NULL, select_thread, NULL);