Hash :
841eaf11
Author :
Date :
2024-08-11T21:01:38
doc: Update regarding Windows <winsock2.h> functions. * doc/posix-functions/accept.texi: Mention that it's declared elsewhere on native Windows. * doc/posix-functions/bind.texi: Likewise. * doc/posix-functions/connect.texi: Likewise. * doc/posix-functions/getpeername.texi: Likewise. * doc/posix-functions/getsockname.texi: Likewise. * doc/posix-functions/getsockopt.texi: Likewise. * doc/posix-functions/listen.texi: Likewise. * doc/posix-functions/recv.texi: Likewise. * doc/posix-functions/recvfrom.texi: Likewise. * doc/posix-functions/select.texi: Likewise. * doc/posix-functions/send.texi: Likewise. * doc/posix-functions/sendto.texi: Likewise. * doc/posix-functions/setsockopt.texi: Likewise. * doc/posix-functions/shutdown.texi: Likewise. * doc/posix-functions/socket.texi: Likewise. * doc/pastposix-functions/gethostbyaddr.texi: Don't say that the function is missing on native Windows. * doc/pastposix-functions/gethostbyname.texi: Likewise. * doc/posix-functions/getprotobyname.texi: Likewise. * doc/posix-functions/getprotobynumber.texi: Likewise. * doc/posix-functions/getservbyname.texi: Likewise. * doc/posix-functions/getservbyport.texi: Likewise. * doc/posix-functions/htonl.texi: Likewise. * doc/posix-functions/htons.texi: Likewise. * doc/posix-functions/inet_addr.texi: Likewise. * doc/posix-functions/inet_ntoa.texi: Likewise. * doc/posix-functions/ntohl.texi: Likewise. * doc/posix-functions/ntohs.texi: Likewise. * doc/posix-functions/gethostname.texi: Update.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@node select
@subsection @code{select}
@findex select
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/select.html}
Gnulib module: select
Portability problems fixed by Gnulib:
@itemize
@item
This function is declared in @code{<winsock2.h>}
instead of @code{<sys/select.h>}
on some platforms:
mingw, MSVC 14.
@item
On Windows platforms (excluding Cygwin), @code{select} can only be
called on descriptors created by the @code{socket} function, not on regular
file descriptors.
@item
On Windows platforms (excluding Cygwin), error codes from this function
are not placed in @code{errno}, and @code{WSAGetLastError} must be used
instead.
@item
On some platforms, this function fails to detect invalid fds with
EBADF, but only if they lie beyond the current maximum open fd:
FreeBSD 8.2.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
When you call @code{select} with a timeout, some implementations modify the
timeout parameter so that upon return from the function, it contains the
amount of time not slept. Other implementations leave the timeout parameter
unmodified.
@item
Under Windows, when passing a pipe, Gnulib's @code{select} replacement might
return 0 even before the timeout has passed. Programs using it with pipes can
thus busy wait.
@item
On Linux, when some file descriptor refers to a regular file, @code{select}
may fail, setting @code{errno} to @code{EBADF}.
@end itemize