summaryrefslogtreecommitdiff
path: root/desktop/unx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-07-13 11:06:07 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-07-13 11:06:07 +0100
commitcdaeb35f9e65215ec24ecbba640179e584ddedc0 (patch)
tree4ef5d244a2d7266f2e9b949265c35899b18c64d0 /desktop/unx
parent36ffa90198a4fe297bf6b74eb78965387bc6c71e (diff)
oosplash.bin - handle EINTR and failed reads more elegantly
Diffstat (limited to 'desktop/unx')
-rwxr-xr-xdesktop/unx/source/start.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index ef191739f15c..85e2e2822c64 100755
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <libgen.h>
#include <string.h>
+#include <errno.h>
#include <osl/nlsupport.h>
#include <osl/process.h>
@@ -679,8 +680,11 @@ read_percent( ChildInfo *info, int *pPercent )
/* read data */
nRead = read( child_info_get_status_fd (info),
pBuffer + nNotProcessed, BUFFER_LEN - nNotProcessed );
- if ( nRead < 0 )
- return sal_False;
+ if ( nRead < 0 ) {
+ if (errno == EINTR)
+ return ProgressContinue;
+ return ProgressExit;
+ }
nRead += nNotProcessed;
pBuffer[nRead] = '\0';