[fpc-devel] Free Pascal / Free Vision: Executing shell commands and showing output

n7800 n7800 at inbox.ru
Fri Jan 30 08:18:22 CET 2026


> 
> 1. Do not use CopyFrom on a non-seekable stream such as a pipe (which is
> used to capture output in TProcess).
> this is documented: https://www.freepascal.org/docs-html/rtl/classes/tstream.copyfrom.html
> 
> 
> 2. Do not use the poWaitOnExit flag. When the program you start outputs
> more
> data then the size of the OS pipe buffer then it will be blocked waiting
> for
> you to free the pipe buffer, while you wait for it to finish.

I'll supplement the answer above with a link to a good article about this:

https://wiki.freepascal.org/Executing_External_Programs#Reading_large_output
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260130/c1a383da/attachment.htm>


More information about the fpc-devel mailing list