[fpc-devel] StdOut capture for FPC RTL
thaddy at thaddy.com
Thu Nov 25 11:11:41 CET 2010
On 25-11-2010 11:01, Jonas Maebe wrote:
> On 25 Nov 2010, at 10:52, Anton Kavalenka wrote:
>> Due to incompatibility of RTL between FPC and Delphi my capturing
>> tricks not work.
>> BTW what the real reason to make these files as threadvar?
> To prevent multiple threads writing to stdin/stdout/sterr at the same
> time from corrupting each other's data (all of these text files use an
> internal buffer, even when the output is immediately flushed afterwards).
That's not a task for a compiler or frame work, but a task for the
Std is short for standard and should be standard. Someone screwed up his
semantics and thereby the code when this anomaly was invented for FPC.
Although the rationale about why this happened is obvious, I have to agree.
More information about the fpc-devel