From b4c89ab52b85370d4e462e21b5484d35e3e7feb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 3 Dec 2014 12:13:35 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Do read ahead for any watched file descriptor. It may break when watching special device files, depending on its internal kernel driver behaviour. We'll see. git-svn-id: svn://localhost/gambas/trunk@6708 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_c_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/gbx/gbx_c_file.c b/main/gbx/gbx_c_file.c index b91fef02c..d7598d030 100644 --- a/main/gbx/gbx_c_file.c +++ b/main/gbx/gbx_c_file.c @@ -59,7 +59,8 @@ static char _buffer[16]; static void callback_read(int fd, int type, CFILE *file) { - GB_Raise(file, EVENT_Read, 0); + if (!STREAM_read_ahead(CSTREAM_stream(file))) + GB_Raise(file, EVENT_Read, 0); }