* more ESysEINTR handling

git-svn-id: trunk@12926 -
This commit is contained in:
Jonas Maebe 2009-03-19 22:01:09 +00:00
parent 08865be30e
commit 483b3b4a30

View File

@ -18,9 +18,11 @@
Function PClose(Var F:file) : cint;
var
pl : ^cint;
res: cint;
begin
fpclose(filerec(F).Handle);
repeat
res:=fpclose(filerec(F).Handle);
until (res<>-1) or (fpgeterrno<>ESysEINTR);
{ closed our side, Now wait for the other - this appears to be needed ?? }
pl:=@(filerec(f).userdata[2]);
pclose := WaitProcess(pl^);
@ -28,10 +30,12 @@ end;
Function PClose(Var F:text) :cint;
var
pl : ^longint;
pl : ^cint;
res : cint;
begin
fpclose(Textrec(F).Handle);
repeat
res:=fpclose(Textrec(F).Handle);
until (res<>-1) or (fpgeterrno<>ESysEINTR);
{ closed our side, Now wait for the other - this appears to be needed ?? }
pl:=@(textrec(f).userdata[2]);
pclose:= WaitProcess(pl^);