* fix for repeating 'x' bug

This commit is contained in:
marco 2003-12-14 14:47:02 +00:00
parent 1662a037a4
commit ae1f7f63b6

View File

@ -209,7 +209,7 @@ Function Do_Write(Handle,Addr,Len:Longint):longint;
Begin
repeat
Do_Write:=Fpwrite(Handle,pchar(addr),len);
until (ErrNo<>ESysEINTR) and (Errno<>ESysEAgain);
until (do_write<>-1) or ((ErrNo<>ESysEINTR) and (Errno<>ESysEAgain));
If Do_Write<0 Then
Begin
Errno2InOutRes;
@ -224,7 +224,7 @@ Function Do_Read(Handle,Addr,Len:Longint):Longint;
Begin
repeat
Do_Read:=Fpread(Handle,pchar(addr),len);
until (ErrNo<>ESysEINTR) and (ErrNo<>ESysEAgain);
until (do_read<>-1) or ((ErrNo<>ESysEINTR) and (ErrNo<>ESysEAgain));
If Do_Read<0 Then
Begin
Errno2InOutRes;
@ -341,7 +341,8 @@ Begin
end;
{ real open call }
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
if (ErrNo=ESysEROFS) and ((OFlags and O_RDWR)<>0) then
if (FileRec(f).Handle<0) and
(ErrNo=ESysEROFS) and ((OFlags and O_RDWR)<>0) then
begin
Oflags:=Oflags and not(O_RDWR);
FileRec(f).Handle:=Fpopen(p,oflags,MODE_OPEN);
@ -670,7 +671,10 @@ End.
{
$Log$
Revision 1.6 2003-11-18 10:12:25 marco
Revision 1.7 2003-12-14 14:47:02 marco
* fix for repeating 'x' bug
Revision 1.6 2003/11/18 10:12:25 marco
* Small fixes for EAGAIN. bunxfunc only has comments added.
Revision 1.5 2003/10/27 17:12:45 marco