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:
parent
60faa0f70b
commit
60f8b2f4d0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user