TProcess: Could not create pipe
Original Reporter info from Mantis: >8<
-
Reporter name: Bug Import
Original Reporter info from Mantis: >8<
- Reporter name: Bug Import
Description:
If poUsePipes is set as an option in TProcess, a "Could not create pipe" exception is thrown after several hundred calls. Removing poUsePipes or commenting out the CreateStreams and 3 fileclose statements in TProcess.execute makes the problem go away... along with access to the streams. I've tried but haven't had any success fixing this.
The following code will reproduce the problem with a TProcess, button and edit on the form:
procedure TForm1.Button1CLICK(Sender: TObject);
var i:Integer;
begin
With Process1 do
Begin
commandline:='ls';
options:=[pousepipes,ponoconsole];
For I:=1 to 50000 do
Begin
edit1.text:=inttostr(i);
active:=true;
WaitonExit;
end
End
end;
Additional information:
Imported information
--------------------
Name: Tom Lisjac
Mail:
Mantis conversion info:
- Mantis ID: 123