poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / read.texi
blob5f06183861284d083b230e0d43c0784fd25ef671
1 @node read
2 @section @code{read}
3 @findex read
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html}
7 Gnulib module: read, stdio, nonblocking
9 Portability problems fixed by Gnulib module @code{read}:
10 @itemize
11 @item
12 This function is declared in a different header file (namely, @code{<io.h>})
13 on some platforms:
14 mingw, MSVC 14.
15 @item
16 This function crashes when invoked with invalid arguments on some platforms:
17 MSVC 14.
18 @end itemize
20 Portability problems fixed by Gnulib module @code{stdio}, together with module @code{nonblocking}:
21 @itemize
22 @item
23 When reading from a non-blocking pipe whose buffer is empty, this function
24 fails with @code{errno} being set to @code{EINVAL} instead of @code{EAGAIN} on
25 some platforms:
26 mingw, MSVC 14.
27 @end itemize
29 Portability problems not fixed by Gnulib:
30 @itemize
31 @item
32 This function may fail with error @code{EINTR}, even in programs that don't
33 install any signal handlers, on some platforms:
34 Mac OS X 10.13.
35 @end itemize
37 For handling @code{EINTR}, Gnulib provides a module @samp{safe-read} with a
38 function @code{safe_read}.