Changes between Initial Version and Version 1 of Ticket #199, comment 26
- Timestamp:
- Aug 1, 2011, 10:45:32 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #199, comment 26
initial v1 3 3 The reason why ferror() returns non-zero is that when the server process issues DosDisconnectNPipe() on its end, DosRead() on the client process aborts with ERROR_PIPE_NOT_CONNECTED which is then translated by LIBC to an ferror() condition (and to errno 57, ENOTCONN). See the updated http://svn.netlabs.org/libc/ticket/247/ for more details. 4 4 5 Turns out that the simplest way to do sois to get rid of the DosDisconnectNPipe() call in QProcess and just issue DosClose(). In this case, client's DosRead() simply returns 0 which is translated to EOF. Surprise, this also fixes the inverted feof() value and hence the correct QFile::atEnd() behavior without the fix applied in r923.5 Turns out that the simplest way to fix the problem is to get rid of the DosDisconnectNPipe() call in QProcess and just issue DosClose(). In this case, client's DosRead() simply returns 0 which is translated to EOF. Surprise, this also fixes the inverted feof() value and hence the correct QFile::atEnd() behavior without the fix applied in r923. 6 6 7 7 So, I applied this workaround in r928. I also reverted r923 since the new fix makes it unnecessary.