On 14/12/2023 21:33, Marco van de Voort via fpc-devel wrote:

Op 14-12-2023 om 21:27 schreef Martin Frb via fpc-devel:

I am actually pretty sure, on Linux, I can get what I want by doing it in the "OnFork" event of TProcess. But on Windows it is well hidden away in the "Execute" method, nothing virtual that could be intercepted.

Change the input handle and use popassinput ?
As I said, not possible (unless I make a copy of the entire TProcess code).  There is no way to intercept "Execute", and it must be done before the Windows API is called to create the process.


But I wonder if this is not too specialistic. It depends on how well you can abstract it into TProcess, and preferably in a somewhat similar way for all OSes.

Well Michael's answer looks like he is about to have what I need. Depends on the when...
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to