summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/osl/unx/readwrite_helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sal/osl/unx/readwrite_helper.c b/sal/osl/unx/readwrite_helper.c
index 41aa41e77..51e1ec6b6 100644
--- a/sal/osl/unx/readwrite_helper.c
+++ b/sal/osl/unx/readwrite_helper.c
@@ -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;
}