[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:
parent
5796ac4e56
commit
40937ec321
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue