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 Windo

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, nothi

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 hand

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 provided)

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 wr

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 that

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 in

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 - fpc-devel@lists.fre

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 read

Re: [fpc-devel] Wrong debug info when using clang backend

2023-12-14 Thread Adriaan van Os via fpc-devel
Jonas Maebe via fpc-devel wrote: I'd rather not introduce directives that are specific to clang, and especially none only apply to the next loop. We don't have a single directive yet that works like this. The latter is a good point and that's why I would suggest to make their Pascal equivalen