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>
This commit is contained in:
parent
d8c6052815
commit
db1c238a66
@ -718,7 +718,8 @@ bool QProcessPrivate::waitForReadyRead(const QDeadlineTimer &deadline)
|
|||||||
|
|
||||||
if (!pid)
|
if (!pid)
|
||||||
return false;
|
return false;
|
||||||
if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
|
|
||||||
|
if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
|
||||||
bool readyReadEmitted = drainOutputPipes();
|
bool readyReadEmitted = drainOutputPipes();
|
||||||
if (pid)
|
if (pid)
|
||||||
processFinished();
|
processFinished();
|
||||||
@ -762,9 +763,8 @@ bool QProcessPrivate::waitForBytesWritten(const QDeadlineTimer &deadline)
|
|||||||
if (!pid)
|
if (!pid)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Wait for the process to signal any change in its state,
|
// Check if the process is signaling completion.
|
||||||
// such as incoming data, or if the process died.
|
if (WaitForSingleObject(pid->hProcess, 0) == WAIT_OBJECT_0) {
|
||||||
if (WaitForSingleObjectEx(pid->hProcess, 0, false) == WAIT_OBJECT_0) {
|
|
||||||
drainOutputPipes();
|
drainOutputPipes();
|
||||||
if (pid)
|
if (pid)
|
||||||
processFinished();
|
processFinished();
|
||||||
|
Loading…
Reference in New Issue
Block a user