Commit b7b20504 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Call VIRTUAL_HandleFault if read/write returns EFAULT.

parent 4bd7128f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment