Losing data reading from a pipe configured with WAIT_NOTUSED

  • Topic title says all really.


    I have a pipe that is configured with ATR_PIPWAIT set to WAIT_NOTUSED. Reading from it with READ fd(..) works, as long as there is enough data (IO_STATUS is 0).


    If the pipe does not contain enough data for what I'm trying to read, the READ returns immediately (thanks to the no-wait), and IO_STATUS is FILE-021 (EOF) as expected. But any data that was in the pipe is now also gone, which is not really useful, as subsequent READs will now not be able to retrieve it.


    Anyone got any ideas? Am I doing this wrong?

Advertising from our partners