mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 19:29:18 +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;
|
Function PClose(Var F:file) : cint;
|
||||||
var
|
var
|
||||||
pl : ^cint;
|
pl : ^cint;
|
||||||
|
res: cint;
|
||||||
begin
|
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 ?? }
|
{ closed our side, Now wait for the other - this appears to be needed ?? }
|
||||||
pl:=@(filerec(f).userdata[2]);
|
pl:=@(filerec(f).userdata[2]);
|
||||||
pclose := WaitProcess(pl^);
|
pclose := WaitProcess(pl^);
|
||||||
@ -28,10 +30,12 @@ end;
|
|||||||
|
|
||||||
Function PClose(Var F:text) :cint;
|
Function PClose(Var F:text) :cint;
|
||||||
var
|
var
|
||||||
pl : ^longint;
|
pl : ^cint;
|
||||||
|
res : cint;
|
||||||
begin
|
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 ?? }
|
{ closed our side, Now wait for the other - this appears to be needed ?? }
|
||||||
pl:=@(textrec(f).userdata[2]);
|
pl:=@(textrec(f).userdata[2]);
|
||||||
pclose:= WaitProcess(pl^);
|
pclose:= WaitProcess(pl^);
|
||||||
|
Loading…
Reference in New Issue
Block a user