Kaydet (Commit) b9dea6ac authored tarafından Julien Chaffraix's avatar Julien Chaffraix Kaydeden (comit) Michael Meeks

Handled EINTR in safeWrite.

This makes us match safeRead's behavior. Spotted by Michael Meeks.
üst 521aebc1
......@@ -39,9 +39,14 @@ sal_Bool safeWrite(int fd, void* data, sal_uInt32 dataSize)
OSL_ASSERT(dataSize == (sal_uInt32)nToWrite);
while ( nToWrite ) {
sal_Int32 nWritten = write(fd, data, nToWrite);
if ( nWritten < 0 )
if ( nWritten < 0 ) {
if ( errno == EINTR )
continue;
return sal_False;
}
OSL_ASSERT(nWritten > 0);
nToWrite -= nWritten;
}
......
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