diff options
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 7f7066271b..e9957d2384 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -472,7 +472,7 @@ bool QProcessPrivate::createChannel(Channel &channel) } QT_BEGIN_INCLUDE_NAMESPACE -#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) +#if defined(Q_OS_MACX) # include <crt_externs.h> # define environ (*_NSGetEnviron()) #else @@ -617,8 +617,10 @@ void QProcessPrivate::startProcess() // Duplicate the environment. int envc = 0; char **envp = 0; - if (environment.d.constData()) + if (environment.d.constData()) { + QProcessEnvironmentPrivate::MutexLocker locker(environment.d); envp = _q_dupEnvironment(environment.d.constData()->hash, &envc); + } // Encode the working directory if it's non-empty, otherwise just pass 0. const char *workingDirPtr = 0; |