On Thu, January 26, 2017 7:28 am, Michael Van Canneyt wrote: > > > On Thu, 26 Jan 2017, Graeme Geldenhuys wrote: > > >> Hi, >> >> >> Whats the differences or pros and cons between using TProcess vs >> RunProcess(). >> > > TProcess gives you full access to the process. You can kill it, > pause it, write to stdin, read from stdout. > > These things cannot be done with RunProcess. > That's one-shot and wait till it exits. >
Similar to FpSystem() and ExecuteProcess, and then there is AssignStream but assignstream/fpsystem unix only http://www.freepascal.org/docs-html/rtl/sysutils/executeprocess.html http://www.freepascal.org/docs-html/rtl/unix/assignstream.html http://www.freepascal.org/docs-html/rtl/unix/fpsystem.html I like fpsystem because it does not require absolute paths to commands, too bad fpsystem not available on Windows. All the above is used in webcmd (part of powtils) and also fpcRun ;-) But I may try RunProcess/TProcess soon! _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal