summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2021-03-27 15:45:45 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2021-03-29 15:54:14 +0200
commitdb1c238a66e3b7ae16768a4e01ce46a51a51eba3 (patch)
tree7ae11c321349b3670524cfd6df4530e500509c4f /src
parentd8c6052815bcff99902cc09a145ffd14dc395e9a (diff)
QProcess/Win: do not use extended API for polling
We avoid entering an alertable wait state there, so calling WaitForSingleObject() instead of the ...Ex() analog would be appropriate. Change-Id: I7cd23805519f18b3174f66537dcf4c0da5061ca0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qprocess_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 7c261e7558..d0e57b51fa 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -718,7 +718,8 @@ bool QProcessPrivate::waitForReadyRead(const QDeadlineTimer &deadline)
if (!pid)
return false;
- if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
+
+ if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
bool readyReadEmitted = drainOutputPipes();
if (pid)
processFinished();
@@ -762,9 +763,8 @@ bool QProcessPrivate::waitForBytesWritten(const QDeadlineTimer &deadline)
if (!pid)
return false;
- // Wait for the process to signal any change in its state,
- // such as incoming data, or if the process died.
- if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
+ // Check if the process is signaling completion.
+ if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
drainOutputPipes();
if (pid)
processFinished();