[fpc-pascal] TProcess read buffer size
Marco van de Voort
fpc at pascalprogramming.org
Thu Jul 15 23:07:53 CEST 2021
Op 2021-07-15 om 20:26 schreef Ryan Joseph via fpc-pascal:
> I have some code the basically does:
>
> while bytesRead > 0 do
> bytesRead := process.Output.Read(buffer^, kBufferSize);
>
> but bytesRead is only ever 512 per call to Read.
>
> Is this a system imposed limit or something that's part of TProcess? Setting kBufferSize to anything larger than 512 has no affect.
Not of TProcess as far as I know, it probably depends on the OS pipe
implementation and maybe the granularity that the processes that you run
outputs data. (buffers its I/O iow calls write() in 512 byte increments )
More information about the fpc-pascal
mailing list