[INTERPRETER]

* BUG: Don't flush the process output at process end if the process stream 
  has already been closed.


git-svn-id: svn://localhost/gambas/trunk@5585 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2013-03-23 18:12:36 +00:00
parent 5bb744d18b
commit 43b8448af8

View file

@ -280,15 +280,18 @@ static void stop_process_after(CPROCESS *_object)
if (THIS->out >= 0)
{
stream = CSTREAM_stream(THIS);
while (!STREAM_eof(stream))
if (!STREAM_is_closed(stream))
{
STREAM_lof(stream, &len);
callback_write(THIS->out, 0, THIS);
if (STREAM_is_closed(stream))
break;
STREAM_lof(stream, &len2);
if (len == len2)
break;
while (!STREAM_eof(stream))
{
STREAM_lof(stream, &len);
callback_write(THIS->out, 0, THIS);
if (STREAM_is_closed(stream))
break;
STREAM_lof(stream, &len2);
if (len == len2)
break;
}
}
}