* Call SysFlushStdio from FlushThread, instead of duplicating its functionality.

* Don't call FlushThread from EndThread, since r17798 it is called from DoneThread.

git-svn-id: trunk@18018 -
This commit is contained in:
sergei 2011-07-25 06:03:40 +00:00
parent 4d0e8ca896
commit 24c3a43b35

View File

@ -124,18 +124,13 @@ procedure FlushThread;
begin begin
{$ifdef FPC_HAS_FEATURE_CONSOLEIO} {$ifdef FPC_HAS_FEATURE_CONSOLEIO}
{ Make sure that all output is written to the redirected file } SysFlushStdio;
Flush(Output);
Flush(ErrOutput);
Flush(StdOut);
Flush(StdErr);
{$endif FPC_HAS_FEATURE_CONSOLEIO} {$endif FPC_HAS_FEATURE_CONSOLEIO}
end; end;
procedure EndThread(ExitCode : DWord); procedure EndThread(ExitCode : DWord);
begin begin
FlushThread;
CurrentTM.EndThread(ExitCode); CurrentTM.EndThread(ExitCode);
end; end;