mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-24 08:42:10 +01:00
* and yet more ESysEINTR handling
git-svn-id: trunk@12927 -
This commit is contained in:
parent
483b3b4a30
commit
d79161a01a
@ -86,14 +86,20 @@ var
|
|||||||
CurIOCallback: PIOCallbackData;
|
CurIOCallback: PIOCallbackData;
|
||||||
begin
|
begin
|
||||||
if Handle^.Data.HighestHandle < 0 then
|
if Handle^.Data.HighestHandle < 0 then
|
||||||
|
begin
|
||||||
// No I/O checks to do, so just wait...
|
// No I/O checks to do, so just wait...
|
||||||
|
repeat
|
||||||
AsyncResult := fpselect(0, nil, nil, nil, TimeOut)
|
AsyncResult := fpselect(0, nil, nil, nil, TimeOut)
|
||||||
|
until (AsyncResult<>-1) or (fpgeterrno<>ESysEINTR);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
CurReadFDSet := PFDSet(Handle^.Data.FDData)[0];
|
CurReadFDSet := PFDSet(Handle^.Data.FDData)[0];
|
||||||
CurWriteFDSet := PFDSet(Handle^.Data.FDData)[1];
|
CurWriteFDSet := PFDSet(Handle^.Data.FDData)[1];
|
||||||
|
repeat
|
||||||
AsyncResult := fpselect(Handle^.Data.HighestHandle + 1,
|
AsyncResult := fpselect(Handle^.Data.HighestHandle + 1,
|
||||||
@CurReadFDSet, @CurWriteFDSet, nil, TimeOut);
|
@CurReadFDSet, @CurWriteFDSet, nil, TimeOut);
|
||||||
|
until (AsyncResult<>-1) or (fpgeterrno<>ESysEINTR);
|
||||||
|
|
||||||
if AsyncResult > 0 then
|
if AsyncResult > 0 then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user