Call VIRTUAL_HandleFault if read/write returns EFAULT.

This commit is contained in:
Ulrich Weigand 1999-02-09 15:29:27 +00:00 committed by Alexandre Julliard
parent 4bd7128f09
commit b7b205046f
1 changed files with 2 additions and 0 deletions

View File

@ -1147,6 +1147,7 @@ BOOL32 WINAPI ReadFile( HANDLE32 hFile, LPVOID buffer, DWORD bytesToRead,
while ((result = read( unix_handle, buffer, bytesToRead )) == -1)
{
if ((errno == EAGAIN) || (errno == EINTR)) continue;
if ((errno == EFAULT) && VIRTUAL_HandleFault( buffer )) continue;
FILE_SetDosError();
break;
}
@ -1180,6 +1181,7 @@ BOOL32 WINAPI WriteFile( HANDLE32 hFile, LPCVOID buffer, DWORD bytesToWrite,
while ((result = write( unix_handle, buffer, bytesToWrite )) == -1)
{
if ((errno == EAGAIN) || (errno == EINTR)) continue;
if ((errno == EFAULT) && VIRTUAL_HandleFault( buffer )) continue;
FILE_SetDosError();
break;
}