[fpc-pascal] Writeln() behaves differently on Windows and Linux, why?

Michael Van Canneyt michael at freepascal.org
Thu Jul 9 22:58:21 CEST 2020



On Thu, 9 Jul 2020, Bo Berglund via fpc-pascal wrote:

> On Thu, 9 Jul 2020 19:36:31 +0200 (CEST), Michael Van Canneyt
> <michael at freepascal.org> wrote:
>
>> Is this done in a thread ? Since you're using indy, I suppose so.
>>
>> The crt unit is not thread safe. The implementation on Windows and Linux is
>> totally different, which may explain the difference you see.
>
> Is there a way to check user keyboard input in the main program while
> action is being done in the server's threads?

Sure, do a fpselect() on file descriptor 0.

Michael.


More information about the fpc-pascal mailing list