Fixed OSX sys_read to not call select if IO is non-blocking
This commit is contained in:
parent
4711065ae9
commit
2eb46b2df2
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-12-10 Steven Tamm <steventamm@mac.com>
|
||||
|
||||
* mac.c (sys_read): Fixed sys_read to not call select if IO is
|
||||
non-blocking
|
||||
|
||||
2002-12-10 Juanma Barranquero <lektu@terra.es>
|
||||
|
||||
* editfns.c (Fformat): Use alloca, not _alloca.
|
||||
|
|
|
@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include <pwd.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#if __MWERKS__
|
||||
#include <unistd.h>
|
||||
#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);
|
||||
|
|
Loading…
Add table
Reference in a new issue