mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 10:49:20 +02:00
* EINTR handling...
git-svn-id: trunk@12930 -
This commit is contained in:
parent
803e78ff8c
commit
fe773871d6
@ -14,8 +14,12 @@
|
|||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
Procedure Do_Close(Handle:thandle);
|
Procedure Do_Close(Handle:thandle);
|
||||||
|
var
|
||||||
|
res: cint;
|
||||||
Begin
|
Begin
|
||||||
Fpclose(cint(Handle));
|
repeat
|
||||||
|
res:=Fpclose(cint(Handle));
|
||||||
|
until (res<>-1) or (geterrno<>ESysEINTR);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure Do_Erase(p:pchar);
|
Procedure Do_Erase(p:pchar);
|
||||||
@ -210,12 +214,16 @@ Begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
{ real open call }
|
{ real open call }
|
||||||
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
|
repeat
|
||||||
|
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
|
||||||
|
until (FileRec(f).Handle<>-1) or (geterrno<>ESysEINTR);
|
||||||
if (FileRec(f).Handle<0) and
|
if (FileRec(f).Handle<0) and
|
||||||
(getErrNo=ESysEROFS) and ((OFlags and O_RDWR)<>0) then
|
(getErrNo=ESysEROFS) and ((OFlags and O_RDWR)<>0) then
|
||||||
begin
|
begin
|
||||||
Oflags:=Oflags and not(O_RDWR);
|
Oflags:=Oflags and not(O_RDWR);
|
||||||
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
|
repeat
|
||||||
|
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
|
||||||
|
until (FileRec(f).Handle<>-1) or (geterrno<>ESysEINTR);
|
||||||
end;
|
end;
|
||||||
If Filerec(f).Handle<0 Then
|
If Filerec(f).Handle<0 Then
|
||||||
Errno2Inoutres
|
Errno2Inoutres
|
||||||
|
Loading…
Reference in New Issue
Block a user