diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-31 13:10:18 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-31 14:31:31 +0200 |
commit | 112a4af10741409b3d8503cb77852a777b607ce0 (patch) | |
tree | fa99f0f37fc1505522fe9368e95484c7732ccda8 /src/corelib/io/qprocess_unix.cpp | |
parent | 29ef0d2bccd1874e20de94485ee05777c3a95c5d (diff) | |
parent | e938150412d22e61926fe16791158805b71268bb (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
examples/examples.pro
qmake/library/qmakebuiltins.cpp
src/corelib/global/qglobal.cpp
Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
src/corelib/global/qnamespace.qdoc
src/corelib/global/qrandom.cpp
src/gui/kernel/qwindow.cpp
Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
src/network/ssl/qsslkey_openssl.cpp
src/plugins/platforms/android/androidjniinput.cpp
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/widgets/widgets/qmenu.cpp
tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index cf9d38097a..15752f84b2 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -762,6 +762,10 @@ bool QProcessPrivate::waitForReadyRead(int msecs) if (qt_pollfd_check(poller.stdinPipe(), POLLOUT)) _q_canWrite(); + // Signals triggered by I/O may have stopped this process: + if (processState == QProcess::NotRunning) + return false; + if (qt_pollfd_check(poller.forkfd(), POLLIN)) { if (_q_processDied()) return false; @@ -808,6 +812,10 @@ bool QProcessPrivate::waitForBytesWritten(int msecs) if (qt_pollfd_check(poller.stderrPipe(), POLLIN)) _q_canReadStandardError(); + // Signals triggered by I/O may have stopped this process: + if (processState == QProcess::NotRunning) + return false; + if (qt_pollfd_check(poller.forkfd(), POLLIN)) { if (_q_processDied()) return false; @@ -853,6 +861,10 @@ bool QProcessPrivate::waitForFinished(int msecs) if (qt_pollfd_check(poller.stderrPipe(), POLLIN)) _q_canReadStandardError(); + // Signals triggered by I/O may have stopped this process: + if (processState == QProcess::NotRunning) + return true; + if (qt_pollfd_check(poller.forkfd(), POLLIN)) { if (_q_processDied()) return true; |