From 5c804dce946a928adcaf97533f5345b33e688ff5 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 6 Sep 2012 12:43:54 +0200 Subject: [PATCH] deb#681185: wait for InternalIPC::ProcessingDone in oosplash Change-Id: I9606ec34ad0d8d24dca71d060bf5e1d37152903c --- desktop/unx/source/start.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index 2ecb779a3e04..f1e872efa4c9 100644 --- a/desktop/unx/source/start.c +++ b/desktop/unx/source/start.c @@ -512,6 +512,17 @@ send_args( int fd, rtl_uString *pCwdPath ) nLen = rtl_string_getLength( pOut ) + 1; bResult = ( write( fd, rtl_string_getStr( pOut ), nLen ) == (ssize_t) nLen ); + if ( bResult ) + { + char resp[ strlen( "InternalIPC::ProcessingDone" ) ]; + ssize_t n = read( fd, resp, SAL_N_ELEMENTS( resp ) ); + bResult = n == (ssize_t) SAL_N_ELEMENTS( resp ) + && (memcmp( + resp, "InternalIPC::ProcessingDone", + SAL_N_ELEMENTS( resp ) ) + == 0); + } + /* cleanup */ rtl_uString_release( pEscapedCwdPath ); rtl_uString_release( pBuffer );