git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28351
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
while ( len )
{
const size_t CHUNK_SIZE = 4096;
while ( len )
{
const size_t CHUNK_SIZE = 4096;
- size_t lenChunk = len > CHUNK_SIZE ? CHUNK_SIZE : len;
+ m_out.Write(pc, len > CHUNK_SIZE ? CHUNK_SIZE : len);
- m_out.Write(pc, lenChunk);
+ // note that not all data could have been written as we don't block on
+ // the write end of the pipe
+ const size_t lenChunk = m_out.LastWrite();
pc += lenChunk;
len -= lenChunk;
pc += lenChunk;
len -= lenChunk;