Changes between Initial Version and Version 1 of Ticket #199, comment 26


Ignore:
Timestamp:
Aug 1, 2011, 8:45:32 PM (13 years ago)
Author:
Dmitry A. Kuminov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #199, comment 26

    initial v1  
    33The 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.
    44
    5 Turns out that the simplest way to do so 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.
     5Turns 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.
    66
    77So, I applied this workaround in r928. I also reverted r923 since the new fix makes it unnecessary.