diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-31 15:37:52 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-31 16:02:09 +0200 |
commit | 533b9ab6fc425746ce30882b424715c97631d907 (patch) | |
tree | 27b68856d57e4090fb9306397309546f4a40f719 /sal/osl/unx/process_impl.cxx | |
parent | 41fbe85870d0f83c0f7eb59f6f517500b0323239 (diff) |
osl_areCommandArgsSet: ensure mutexes locked when accessing data.
Change-Id: I6b1f10e74aafc47e5618290d92087563c60e3c49
Diffstat (limited to 'sal/osl/unx/process_impl.cxx')
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index b63f222ec15f..c70e11141e74 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -193,7 +193,10 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC int SAL_CALL osl_areCommandArgsSet (void) { - return (g_command_args.m_nCount > 0); + pthread_mutex_lock (&(g_command_args.m_mutex)); + int nRet = (int) (g_command_args.m_nCount > 0); + pthread_mutex_unlock (&(g_command_args.m_mutex)); + return nRet; } /*************************************** |