[fpc-pascal] TProcess vs RunProcess()
Marco van de Voort
marcov at stack.nl
Sun Jan 29 11:18:18 CET 2017
In our previous episode, Lars said:
> Assign(StdErr, 'somefile.txt')
> Rewrite(StdErr)
>
> And didn't seem to work
>
> So if you run a process and nothing prints to stdout, and there is some
> data printed to stderr, I do not know how to capture it. Which makes me
> want to try TProcess instead, but if I could do it with FpSystem and
> ExecuteProcess that would be nice
Executeprocess doesn't support piping. It orignally was mainly meant as a
portable dos.exec with parameters passed separately and without string
length limits, implementable on RTL level.
If I were you I would simply look at tprocess sources how it pipes stderr.
More information about the fpc-pascal
mailing list