Go to file
Alex Trotsenko 6a6d12ea4b Split QProcessPrivate::_q_processDied()
The completion of the child process can take place asynchronously or in
one of the waitFor...() functions. In both cases, we used the same
handler (_q_processDied()), which caused several problems:

  a. technically, waitForReadyRead() should have taken into account the
     result of the calls to _q_canRead...() slots inside the
     _q_processDied() function:

       - the user calls waitForReadyRead();
       - forkfd descriptor becomes signaled, while a grandchild
         process is still alive;
       - as readyRead() signal has not been emitted, _q_processDied()
         is called;
       - the grandchild process writes to stdout pipe;
       - now data arrives, and _q_processDied() will collect it, but
         won't report it.

  b. we had a bug with recursions on Unix:

       - death notification comes asynchronously;
       - waitForDeadChild() closes forkfd;
       - _q_canRead...() emits readyRead();
       - a slot connected to readyRead() calls waitForFinished();
       - waitForFinished() hangs (forkfd == -1).

   c. for blocking functions, drainOutputPipes() was called twice on
      Windows.

By introducing a new processFinished() function, we leave the read
operations in the _q_processDied() slot, while the process completion
code is guaranteed to run only once.

Change-Id: I5f9d09bc68a058169de4d9e490b48fc0b35e94cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-09 13:15:54 +00:00
.github/workflows GitHub Actions: Fix workflow file 2020-09-11 13:37:48 +02:00
bin CMake: Mark qt-cmake-standalone-test as an executable on Unix 2020-12-04 11:22:38 +01:00
cmake CMake: improve FindMySQL.cmake 2021-01-09 00:16:34 +08:00
coin Android: install android test scripts to libexec to test on all modules 2020-12-11 20:28:50 +00:00
config.tests Remove the qmake project files 2021-01-07 15:32:28 +01:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Remove the qmake project files 2021-01-07 15:32:28 +01:00
examples Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs macOS: Don't hard-code x86_64 as the architecture when using qmake 2020-12-07 15:35:55 +01:00
qmake Remove the qmake project files 2021-01-07 15:32:28 +01:00
src Split QProcessPrivate::_q_processDied() 2021-01-09 13:15:54 +00:00
tests tst_QSslSocket::setSslConfiguration - skip if SecureTransport is in use 2021-01-08 20:33:24 +00:00
util Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
.cmake.conf CMake: Enable NEW policies by CMake version with a global default 2020-12-07 13:22:57 +11:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_configure.cmake CMake: Add --enable-new-dtags flag support 2020-12-22 10:28:34 +00:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2020-12-15 15:54:46 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt CMake: Bail out if the build dir is symlinked 2020-12-21 13:22:26 +01:00
config_help.txt Doc: Add -qt-host-path to configure's help screen 2020-12-07 15:26:11 +01:00
configure Remove qmake-related code from configure 2020-12-21 10:33:33 +01:00
configure.bat Remove qmake-related code from configure 2020-12-21 10:33:33 +01:00
configure.cmake CMake: Add --enable-new-dtags flag support 2020-12-22 10:28:34 +00:00
configure.json macOS: Don't hard-code x86_64 as the architecture when using qmake 2020-12-07 15:35:55 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake CMake: Add extra targets to run single benchmark using CMake generator 2020-12-07 14:26:07 +00:00
sync.profile Generate QUtf8StringView header file from qutf8stringview.h 2020-11-07 08:35:11 +00:00