Ticket #199: qprocess_os2.diff
File qprocess_os2.diff, 1.6 KB (added by , 13 years ago) |
---|
-
qprocess_os2.cpp
1322 1322 1323 1323 qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen) 1324 1324 { 1325 QMutexLocker lock(QProcessManager::pipeStateLock()); 1326 1325 1327 ULONG actual = 0; 1326 1328 APIRET arc = DosRead(stdoutChannel.pipe.server, data, maxlen, &actual); 1327 1329 1328 1330 qint64 bytesRead = -1; 1329 1331 if (arc == NO_ERROR) { 1330 1332 bytesRead = (qint64)actual; 1333 1334 if (!dying && pipeData[OutPipe].signaled) { 1335 if (actual >= pipeData[OutPipe].bytes) { 1336 pipeData[OutPipe].bytes = 0; 1337 pipeData[OutPipe].signaled = false; 1338 } else { 1339 pipeData[OutPipe].bytes -= actual; 1340 } 1341 } 1331 1342 } 1332 1343 1333 1344 DEBUG(("QProcessPrivate::readFromStdout(%p \"%s\", %lld) == %lld", … … 1337 1348 1338 1349 qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen) 1339 1350 { 1351 QMutexLocker lock(QProcessManager::pipeStateLock()); 1352 1340 1353 ULONG actual = 0; 1341 1354 APIRET arc = DosRead(stderrChannel.pipe.server, data, maxlen, &actual); 1342 1355 1343 1356 qint64 bytesRead = -1; 1344 1357 if (arc == NO_ERROR) { 1345 1358 bytesRead = (qint64)actual; 1359 1360 if (!dying && pipeData[ErrPipe].signaled) { 1361 if (actual >= pipeData[ErrPipe].bytes) { 1362 pipeData[ErrPipe].bytes = 0; 1363 pipeData[ErrPipe].signaled = false; 1364 } else { 1365 pipeData[ErrPipe].bytes -= actual; 1366 } 1367 } 1346 1368 } 1347 1369 1348 1370 DEBUG(("QProcessPrivate::readFromStderr(%p \"%s\", %lld) == %lld",