mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 21:29:31 +02:00
* more ESysEINTR handling
git-svn-id: trunk@12926 -
This commit is contained in:
parent
08865be30e
commit
483b3b4a30
@ -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^);
|
||||
|
Loading…
Reference in New Issue
Block a user