# HG changeset patch # User Steven Tamm # Date 1039538869 0 # Node ID 0360bdd5a70b6c9261a5729b7a5e4288e2fa725d # Parent 90cdeb7dd5351be6ce8e577531277a4cec5b8f7d Fixed OSX sys_read to not call select if IO is non-blocking diff -r 90cdeb7dd535 -r 0360bdd5a70b src/mac.c --- a/src/mac.c Tue Dec 10 13:20:09 2002 +0000 +++ b/src/mac.c Tue Dec 10 16:47:49 2002 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #if __MWERKS__ #include #endif @@ -2811,7 +2812,8 @@ int r; /* Use select to block on IO while still checking for quit_char */ - if (!inhibit_window_system && !noninteractive) + if (!inhibit_window_system && !noninteractive && + ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) { FD_ZERO (&rfds); FD_SET (fds, &rfds);