[fpc-pascal] Question about TProcess
vsnijders at quicknet.nl
Fri May 11 00:34:13 CEST 2007
Darius Blaszijk schreef:
> The following piece of code is giving me headaches. When I add the
> option poUsePipes, the application starts and does not seem to do
> anything else anymore. It just opens a commandline terminal and that is
> that. When I leave the option out the application actually starts "make"
> and then crashes because AProcess.Output is nil.
> What did I forget? I'm working on WinXP. On Linux btw the code works.
> procedure ExecuteApp(CmdLine: string);
> AProcess: TProcess;
> AStringList: TStringList;
> AProcess := TProcess.Create(nil);
> AStringList := TStringList.Create;
> AProcess.CommandLine := CmdLine;
> AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes];
Maybe the output buffer is full and the application is waiting for you
to read from the pipe. See the reading large output program at
More information about the fpc-pascal