title: How do memory-mapped files handle I/O errors?
body: <p>I am modifying a tool that currently opens files and reads them with fread() to use memory-mapped files. This program frequently reads from devices that may have I/O errors. Currently we catch these with errors returned by fread(). How do I/O errors get reported with memory-mapped files?</p>