Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Michael Van Canneyt via fpc-devel
On Thu, 14 Dec 2023, Martin Frb via fpc-devel wrote: 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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Martin Frb via fpc-devel
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,

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Marco van de Voort via fpc-devel
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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Martin Frb via fpc-devel
On 14/12/2023 20:54, Marco van de Voort via fpc-devel wrote: 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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Marco van de Voort via fpc-devel
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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Martin Frb via fpc-devel
On 14/12/2023 18:13, Marco van de Voort via fpc-devel wrote: 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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Marco van de Voort 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

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Martin Frb via fpc-devel
On 14/12/2023 18:06, Michael Van Canneyt via fpc-devel wrote: Actually, I already started an implementation of an extension half a year ago. Is there an accessible branch for that? (maybe in a fork?) ___ fpc-devel maillist -

Re: [fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread Michael Van Canneyt via fpc-devel
On Thu, 14 Dec 2023, Martin Frb via fpc-devel wrote: If I am right the TProcess currently does not allow redirection of StdOut/In to/from a file (or other handle provided). If it does, and I have been missing the "how to", then please enlighten me and disregard the remainder of the mail.

[fpc-devel] TProcess and redirection of StdIn/Out (e.g. from/to files)

2023-12-14 Thread 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). If it does, and I have been missing the "how to", then please enlighten me and disregard the remainder of the mail. The code for setting up redirection to pipes (to be