diff options
| author | Steven Tamm | 2002-12-10 16:48:04 +0000 |
|---|---|---|
| committer | Steven Tamm | 2002-12-10 16:48:04 +0000 |
| commit | 2eb46b2df249746874003e9d2a0454308feb5372 (patch) | |
| tree | ac022d179872294ba6691ba2bad3483508926067 | |
| parent | 4711065ae92dc56a20d83fd7607151ece6a587a6 (diff) | |
| download | emacs-2eb46b2df249746874003e9d2a0454308feb5372.tar.gz emacs-2eb46b2df249746874003e9d2a0454308feb5372.zip | |
Fixed OSX sys_read to not call select if IO is non-blocking
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/mac.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 650df8494e7..b8318c41949 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-12-10 Steven Tamm <steventamm@mac.com> | ||
| 2 | |||
| 3 | * mac.c (sys_read): Fixed sys_read to not call select if IO is | ||
| 4 | non-blocking | ||
| 5 | |||
| 1 | 2002-12-10 Juanma Barranquero <lektu@terra.es> | 6 | 2002-12-10 Juanma Barranquero <lektu@terra.es> |
| 2 | 7 | ||
| 3 | * editfns.c (Fformat): Use alloca, not _alloca. | 8 | * editfns.c (Fformat): Use alloca, not _alloca. |
| @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 32 | #include <pwd.h> | 32 | #include <pwd.h> |
| 33 | #include <sys/param.h> | 33 | #include <sys/param.h> |
| 34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
| 35 | #include <fcntl.h> | ||
| 35 | #if __MWERKS__ | 36 | #if __MWERKS__ |
| 36 | #include <unistd.h> | 37 | #include <unistd.h> |
| 37 | #endif | 38 | #endif |
| @@ -2811,7 +2812,8 @@ int sys_read (fds, buf, nbyte) | |||
| 2811 | int r; | 2812 | int r; |
| 2812 | 2813 | ||
| 2813 | /* Use select to block on IO while still checking for quit_char */ | 2814 | /* Use select to block on IO while still checking for quit_char */ |
| 2814 | if (!inhibit_window_system && !noninteractive) | 2815 | if (!inhibit_window_system && !noninteractive && |
| 2816 | ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) | ||
| 2815 | { | 2817 | { |
| 2816 | FD_ZERO (&rfds); | 2818 | FD_ZERO (&rfds); |
| 2817 | FD_SET (fds, &rfds); | 2819 | FD_SET (fds, &rfds); |