[INTERPRETER]

* BUG: Process: Don't call the Read event if there is nothing to read.


git-svn-id: svn://localhost/gambas/trunk@6686 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-11-29 14:45:33 +00:00
parent 5796ac4e56
commit 40937ec321

View file

@ -165,8 +165,11 @@ static void callback_write(int fd, int type, CPROCESS *process)
if (n > 0)
process->result = STRING_add(process->result, COMMON_buffer, n);
}
else if (GB_CanRaise(process, EVENT_Read) && !STREAM_is_closed(CSTREAM_stream(process))) // && !STREAM_eof(CSTREAM_stream(process))) //process->running &&
GB_Raise(process, EVENT_Read, 0);
else if (GB_CanRaise(process, EVENT_Read) && !STREAM_is_closed(CSTREAM_stream(process)))
{
if (!STREAM_eof(CSTREAM_stream(process)))
GB_Raise(process, EVENT_Read, 0);
}
else
close_fd(&process->out);
}