tprocess aprocess.execute lazarus / 21-General ---------------------------------------------------------------------- toby · 2022-06-14 17:09 Hi when i run aprocess.execute (from aprocess := tprocess.create) thee is a max output limit of 64K from the program run whose output (100K) i want to capture and get into a tsriinglist anyone know where the problem is ?   bash or fpc?  and possibly how to fix or get around it? thanks ---------------------------------------------------------------------- marcov · 2022-06-14 19:23 If you don't poll the pipe regularly, you are bound to the maximum size the OS buffers for a pipe, which seems to be 64k for your process. See https://wiki.freepascal.org/Executing_External_Programs#Reading_la rge_output or just use runcommand that has this all predone. ---------------------------------------------------------------------- toby · 2022-06-14 20:03 thank you marcov i was hoping for a simpler fpc method to just increase the pipe size? would it be possible to do it in linux with fpc? what about binding to syscalls? (syscalls unit?( thanks ---------------------------------------------------------------------- winni · 2022-06-14 20:06 Hi! Linux - the world at your fingertips. man pipe(7) : ----snip----------------- In Linux versions before 2.6.11, the capacity of a pipe was the        same as the system page size (e.g., 4096 bytes on i386).  Since        Linux 2.6.11, the pipe capacity is 16 pages (i.e., 65,536 bytes        in a system with a page size of 4096 bytes).  Since Linux 2.6.35,        the default pipe capacity is 16 pages, but the capacity can be        queried and set using the fcntl(2) F_GETPIPE_SZ and F_SETPIPE_SZ        operations.  See fcntl(2) for more information. ----snap----------------- Winni ---------------------------------------------------------------------- marcov · 2022-06-14 21:00 Quote from: toby on June 14, 2022, 10:03:49 pmi was hoping for a simpler fpc method to just increase the pipe size? It doesn't get much simpler than runcommand. The result is in a string, that you can put into stringlist.text to split it. I don't see why you would try this, the result would be unportable and fragile.