read
====

POSIX specification:
 https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html

Gnulib module: read, stdio, nonblocking

Portability problems fixed by Gnulib module read:

  * This function is declared in a different header file (namely, <io.h>) on some platforms: mingw, MSVC 14.

  * This function crashes when invoked with invalid arguments on some platforms: MSVC 14.

Portability problems fixed by Gnulib module stdio, together with module nonblocking:

  * When reading from a non-blocking pipe whose buffer is empty, this function fails with errno being set to EINVAL instead of EAGAIN on some platforms: mingw, MSVC 14.

Portability problems not fixed by Gnulib:

  * This function may fail with error EINTR, even in programs that don't install any signal handlers, on some platforms: macOS 11.1.

For handling EINTR, Gnulib provides a module safe-read with a function safe_read.