[lazarus] TProcess:Unable to create pipe...
Tom Lisjac
netdxr at adelphia.net
Mon Jun 23 19:00:45 EDT 2003
I'd been seeing some "Unable to create Pipe" exceptions when making
repeated calls to TProcess so I set up a test case. Dropping a TProcess,
button and an edit on a form and running the following code reproduces
the problem. On my system it fails on call 326. Setting "options:=[];"
executes all 50000 calls without error.
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;
Although this probably isn't related, bracketing the CreateProcess call
with a "try" at line 698 and "finally" at line 707 in process.pp would
close the pipes and dispose of FEnv's memory even if the exception at
line 706 were taken.
-Tom
More information about the Lazarus
mailing list