[Libreoffice-commits] .: desktop/unx
Michael Meeks
michael at kemper.freedesktop.org
Wed Jul 13 03:08:05 PDT 2011
desktop/unx/source/start.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 121eb0fcb2edf99c73821c07211e8d77da1e6286
Author: Michael Meeks <michael.meeks at novell.com>
Date: Wed Jul 13 11:06:07 2011 +0100
oosplash.bin - handle EINTR and failed reads more elegantly
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index a3a8ed6..64e4885 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';
More information about the Libreoffice-commits
mailing list