Changeset 3776


Ignore:
Timestamp:
Mar 22, 2012, 1:19:05 PM (13 years ago)
Author:
bird
Message:

read/fhOs2FileWrite: Translate ERROR_PIPE_NOT_CONNECTED when returned by DosRead to a 0 byte read / EOF indicator. Only named pipes will return this status and only when the pipe was actively disconnected. Fixes #247.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/src/lib/sys/__read.c

    r2647 r3776  
    8686    if (rc)
    8787    {
     88        if (rc == ERROR_PIPE_NOT_CONNECTED)
     89            LIBCLOG_RETURN_MSG(0, "ret 0 [pipe-disconnect]\n");
    8890        if (rc > 0)
    8991            rc = -__libc_native2errno(rc);
  • trunk/libc/src/kNIX/os2/fhOS2File.c

    r3770 r3776  
    161161        rc = DosWrite(pFH->hNative, pvBuf, cbToWrite, &cbActuallyWritten);
    162162
    163 
    164163    /* deal with the return code. */
    165164    if (!rc)
     
    169168    }
    170169    *pcbWritten = 0;
     170    if (rc == ERROR_PIPE_NOT_CONNECTED)
     171        LIBCLOG_RETURN_MSG(0, "ret 0 *pcbWritten=0 [pipe-disconnect]\n");
    171172    if (rc > 0)
    172173        rc = -__libc_back_native2errno(rc);
Note: See TracChangeset for help on using the changeset viewer.