Commit 2eb46b2d authored by Steven Tamm's avatar Steven Tamm
Browse files

Fixed OSX sys_read to not call select if IO is non-blocking

parent 4711065a
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment