tmedicci opened a new pull request, #1652:
URL: https://github.com/apache/nuttx-apps/pull/1652

   ## Summary
   
   Previously, if the read bytes were less than the requested, the file was 
closed immediately. This behavior, however, does not consider the fact that the 
read operation may be blocking when no bytes are available at the moment. That 
is true for a named pipe (FIFO), for instance. Thus, reading it again lets to 
the underlying file system the decision of 1) blocking until bytes become 
available or 2) return 0 immediately (the case for actual files) or 3) read 
available bytes.
   
   ## Impact
   
   No impact on actual files: if the file has reached its end, the second 
`read` operation will return `0` and the file will be closed. 
   It enables, however, using files that `read` may block to wait for new bytes 
to become available. That is the case for named pipes (FIFO).
   
   ## Testing
   
   Tested on ESP32-LyraT board using an actual file (`romfs`), a HTTP streamed 
file, and a continuously fed named pipe (`mkfifo` + 
[rtpdump](https://github.com/apache/nuttx-apps/pull/1651)). 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to