Details
Description
The behavior of QProcess::waitForFinished() seems to change when there's a QWebEngineView. The attached example starts a program (/bin/cat) with QProcess, calls QProcess::closeWriteChannel() and then waits for the process to finish using QProcess::waitForFinished().
If QWebEngineView isn't involved, QProcess::waitForFinished() returns true without noticable delay. If however an otherwise unrelated QWebEngineView is created and provided with a URL (main.cpp:13-14), QProcess::waitForFinished() times out and returns false. During the timeout interval ps shows the started process as <defunct>. Qt prints the following output to the console:
QProcess: Destroyed while process ("/bin/cat") is still running.
After that, it still takes some time before the program exits.
Attachments
For Gerrit Dashboard: QTBUG-42747 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
103038,4 | <chromium> Do not overwrite signal handlers in the browser process. | 37.0.2062-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
103086,4 | Tell the ContentMainRunner to not reset signal handlers in the browser process. | 5.4 | qt/qtwebengine | Status: MERGED | +2 | 0 |
103090,2 | <chromium> Do not overwrite signal handlers in the browser process. | 40.0.2214-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
114706,2 | <chromium> Do not overwrite signal handlers in the browser process. | 44-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
127628,2 | <chromium> Do not overwrite signal handlers in the browser process. | 47-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
147296,2 | <chromium> Do not overwrite signal handlers in the browser process. | 49-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
191187,2 | FIXUP: <chromium> Do not overwrite signal handlers in the browser process. | 56-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
387894,2 | Do not overwrite signal handlers in the browser process. | 87-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
389229,2 | Do not overwrite signal handlers in the browser process. | 90-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
389230,2 | Do not overwrite signal handlers in the browser process. | 94-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |