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>
This commit is contained in:
parent
db5c901594
commit
4ff41e6ff8
@ -776,10 +776,8 @@ bool QProcessPrivate::waitForFinished(const QDeadlineTimer &deadline)
|
|||||||
if (stderrChannel.reader && stderrChannel.reader->waitForReadyRead(0))
|
if (stderrChannel.reader && stderrChannel.reader->waitForReadyRead(0))
|
||||||
timer.resetIncrements();
|
timer.resetIncrements();
|
||||||
|
|
||||||
if (!pid) {
|
if (!pid)
|
||||||
drainOutputPipes();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
|
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
|
||||||
drainOutputPipes();
|
drainOutputPipes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user