Changeset 846 for trunk/src/corelib/io/qwindowspipewriter.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/corelib/io/qwindowspipewriter.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 41 41 42 42 #include "qwindowspipewriter_p.h" 43 43 44 44 45 QT_BEGIN_NAMESPACE … … 101 102 void QWindowsPipeWriter::run() 102 103 { 103 OVERLAPPED overl = {0, 0, 0, 0, NULL}; 104 OVERLAPPED overl; 105 memset(&overl, 0, sizeof overl); 104 106 overl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); 105 107 forever { … … 127 129 while ((!quitNow) && totalWritten < maxlen) { 128 130 DWORD written = 0; 129 // Write 2k at a time to prevent flooding the pipe. If you130 // write too much (4k-8k), the pipe can close131 // unexpectedly.132 131 if (!WriteFile(writePipe, ptrData + totalWritten, 133 qMin<int>(2048, maxlen - totalWritten), &written, &overl)) { 132 maxlen - totalWritten, &written, &overl)) { 133 134 134 if (GetLastError() == 0xE8/*NT_STATUS_INVALID_USER_BUFFER*/) { 135 135 // give the os a rest
Note:
See TracChangeset
for help on using the changeset viewer.