micro-optimization/-clarification

close stdin and let the process finish right away instead of first
waiting for a reaction (which is not supposed to come) and then
finishing.

Change-Id: Ifcf200eead5ed95217843e105f9d2dbb5398d646
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-09-03 19:56:22 +02:00 committed by The Qt Project
parent 60faa0f70b
commit 60f8b2f4d0

View File

@ -57,12 +57,12 @@ int main()
if (process.write("forwarded\n") != 10)
return -1;
process.waitForReadyRead(250);
if (process.bytesAvailable() != 0)
process.closeWriteChannel();
if (!process.waitForFinished(5000))
return -1;
process.closeWriteChannel();
process.waitForFinished(5000);
if (process.bytesAvailable() != 0)
return -1;
#endif
return 0;
}