I have a non-blocking keyboard I/O routine I've used for years under IRIX, Solaris and Red Hat linux. It doesn't seem to work under cygwin, however. The core of it is:
fcntl(0. F__SETFL, fcntl(0, F_GETFL) | O_NONBLOCK) tcgetattr(0, &termios_p); termios_p.c_lflag &= ~(ICANON | ECHO); termios_p.c_lflag &= ~(ICANON); termios_p.c_cc[VMIN] = 1; termios_p.c_cc[VTIME] = 0; tcsetattr(0, TCSANOW, &termios_p); I subsituted FIONBIO for O_NONBLOCK and both complied and ran but both versions still blocked. Is there something obvious I'm doing wrong? Is there an alternative way to do this under cygwin? TIA! Neall -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/