Op 14-12-2023 om 20:29 schreef Martin Frb via fpc-devel:
 Op 14-12-2023 om 17:30 schreef Martin Frb via fpc-devel:
If I am right the TProcess currently does not allow redirection of StdOut/In to/from a file (or other handle provided).

It does, if you need a runcommandloop like routine that writes to file. Partially this can be even simplified by inheriting TProcess and overriding readinputstream
But that means the parent process has to read the data (from the file) and forward it.

Without a shell that always needs to happen. How else ? Keep in mind that TProcess is a kernel and not a shell level concept.

Also not sure how to simulate an EOF in that case....

Probably close the pipe.

Anyway the full project is here: http://www.stack.nl/~marcov/files/processmemodemo.zip

It is slightly different, a TProcess based application that tries to instrument a secondary binary.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to