diff --git a/src/ChangeLog b/src/ChangeLog index 650df8494e7..b8318c41949 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-12-10 Steven Tamm + + * mac.c (sys_read): Fixed sys_read to not call select if IO is + non-blocking + 2002-12-10 Juanma Barranquero * editfns.c (Fformat): Use alloca, not _alloca. diff --git a/src/mac.c b/src/mac.c index 439f900db5b..bf1915cbacd 100644 --- a/src/mac.c +++ b/src/mac.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #if __MWERKS__ #include #endif @@ -2811,7 +2812,8 @@ int sys_read (fds, buf, nbyte) 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);