diff options
Diffstat (limited to 'sal/osl/unx/process.cxx')
-rw-r--r-- | sal/osl/unx/process.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index ee6346899840..24d0be6af678 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -685,7 +685,10 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName, hThread = osl_createThread(ChildStatusProc, &Data); - osl_waitCondition(Data.m_started, NULL); + if (hThread != 0) + { + osl_waitCondition(Data.m_started, NULL); + } osl_destroyCondition(Data.m_started); for (i = 0; Data.m_pszArgs[i] != NULL; i++) @@ -703,12 +706,14 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName, if (Data.m_pProcImpl->m_pid != 0) { + assert(hThread != 0); + *pProcess = Data.m_pProcImpl; if (Options & osl_Process_WAIT) osl_joinProcess(*pProcess); - return osl_Process_E_None; + return osl_Process_E_None; } osl_destroyCondition(Data.m_pProcImpl->m_terminated); |