diff options
author | James McDonnell <jmcdonnell@qnx.com> | 2016-03-18 12:53:12 -0400 |
---|---|---|
committer | James McDonnell <jmcdonnell@qnx.com> | 2016-03-22 15:20:06 +0000 |
commit | 005a8bfbf0022f03dafafcf2b5c438ccf0675a49 (patch) | |
tree | 653114a219805930e4852ae8cb2c8894e85f8ccc /src/corelib/io/qprocess_p.h | |
parent | 663263c124339db432cd5596b87462343096dd83 (diff) |
Remove QPROCESS_USE_SPAWN and all that it surrounds
The spawn code was only used to make QProcess work on QNX 6.5.0. Fork
works on QNX 6.6.0. The QNX spawn implementation has a flaw that causes
a deadlock in certain situations. When a working directory is specified
for the process, the QNX spawn implementation stops all threads except
the one doing the spawn so that it can temporarily change the process'
working directory. This can lead to a deadlock if the thread does
anything that conficts with something being done in a stopped thread.
QNX 6.5.0 is no longer supported in Qt 5.6.0 so we can just switch QNX
to the fork implementation and get rid of the spawn implementation.
Made a QNX specific adjustment to the hardExit test. There's a bug
in the OS that the test can run into because it does something that
normal applications wouldn't.
Task-number: QTBUG-47250
Change-Id: Ib32567d2c15ce651815858000035ac5aa6f35224
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/corelib/io/qprocess_p.h')
-rw-r--r-- | src/corelib/io/qprocess_p.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index d3f251c399..436869462c 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -62,9 +62,6 @@ typedef HANDLE Q_PIPE; #else typedef int Q_PIPE; #define INVALID_Q_PIPE -1 -# ifdef Q_OS_QNX -# define QPROCESS_USE_SPAWN -# endif #endif #ifndef QT_NO_PROCESS @@ -347,10 +344,8 @@ public: void start(QIODevice::OpenMode mode); void startProcess(); -#if defined(Q_OS_UNIX) && !defined(QPROCESS_USE_SPAWN) +#if defined(Q_OS_UNIX) void execChild(const char *workingDirectory, char **path, char **argv, char **envp); -#elif defined(QPROCESS_USE_SPAWN) - pid_t spawnChild(pid_t *ppid, const char *workingDirectory, char **argv, char **envp); #endif bool processStarted(QString *errorMessage = Q_NULLPTR); void terminateProcess(); |