summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2021-01-08 17:27:12 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2021-01-09 15:16:42 +0200
commit4ff41e6ff86b3f6a3a0ba215e9a3c8be19cf8055 (patch)
treed825091e3df478bd6a7f42234440f4b9583efa71 /src/corelib/io
parentdb5c90159437e84024f8a983a0de5d310f2d0307 (diff)
Remove useless call in QProcessPrivate::waitForFinished() on Windows
if pid == nullptr, the child process has already exited and the pipe readers have been stopped. So the call to drainOutputPipes() is unnecessary here. Change-Id: I0bed90d08ac879bb0ae178a1cdc37afb9d825314 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess_win.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 2a5b8fd4fd..e65d4683be 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -776,10 +776,8 @@ bool QProcessPrivate::waitForFinished(const QDeadlineTimer &deadline)
if (stderrChannel.reader && stderrChannel.reader->waitForReadyRead(0))
timer.resetIncrements();
- if (!pid) {
- drainOutputPipes();
+ if (!pid)
return true;
- }
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
drainOutputPipes();