[INTERPRETER]
* BUG: 'Exec ... To' and 'Shell ... To' work correctly again. git-svn-id: svn://localhost/gambas/trunk@6698 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
a8f8239794
commit
064ec73404
1 changed files with 15 additions and 2 deletions
|
@ -162,10 +162,23 @@ static void callback_write(int fd, int type, CPROCESS *process)
|
|||
|
||||
if (process->to_string)
|
||||
{
|
||||
int n = read(fd, COMMON_buffer, 256);
|
||||
int n;
|
||||
|
||||
CSTREAM_stream(process)->common.has_read = FALSE;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
n = read(fd, COMMON_buffer, 256);
|
||||
if (n >= 0 || errno != EINTR)
|
||||
break;
|
||||
}
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
process->result = STRING_add(process->result, COMMON_buffer, n);
|
||||
return;
|
||||
CSTREAM_stream(process)->common.has_read = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (GB_CanRaise(process, EVENT_Read))
|
||||
|
|
Loading…
Reference in a new issue