[fpc-devel] TProcess.output.read does not return until process stopped running.

Jonas Maebe jonas.maebe at elis.ugent.be
Fri May 19 16:27:37 CEST 2006


On 19 mei 2006, at 15:20, ik wrote:

> When executing a program using TProcess, it seems that Output.read
> does not return from the reading, until the execution of the process
> is over.

The returning probably happens every 4KB of data or so (and once the  
program has finished). The reason is that if the communications pipe  
flushes after every write, you get much less potential parallelism  
and more system overhead. And that's only the OS-part of the  
buffering, it's quite possible that the program you execute is also  
buffering its output and only flushes after every X KB of written data.


Jonas



More information about the fpc-devel mailing list