diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2020-06-05 13:35:16 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2020-06-19 19:48:50 +0300 |
commit | 7aa327648c2f2744e381582a98813a545b4f1cb1 (patch) | |
tree | 541997084eacff2d1d7206982f139bf8ce01b01c /src | |
parent | 10f8ebe3e2075a02d910f2d02cc0e81abe727c2f (diff) |
QProcess/Win: Avoid reentering the code in _q_processDied()
In case drainOutputPipes() makes a recursion, setting 'dying' to true
should protect the code from reentering. But, the next call to
QProcessPrivate::cleanup() resets this variable, which allows a
secondary pass. So, we should postpone setting 'dying' to false until
a new process session is started.
Fixes: QTBUG-33731
Change-Id: I269ad3b8defa32aa714ea13f8803a07259f475dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 633777fd5c..5e19f7256f 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -894,7 +894,6 @@ void QProcessPrivate::cleanup() #endif pid = 0; sequenceNumber = 0; - dying = false; if (stdoutChannel.notifier) { delete stdoutChannel.notifier; @@ -2148,6 +2147,7 @@ void QProcessPrivate::start(QIODevice::OpenMode mode) stderrChannel.closed = false; exitCode = 0; + dying = false; exitStatus = QProcess::NormalExit; processError = QProcess::UnknownError; errorString.clear(); |