cosmopolitan/test/libc/sock
Justine Tunney 2ec413b5a9
Fix bugs in poll(), select(), ppoll(), and pselect()
poll() and select() now delegate to ppoll() and pselect() for assurances
that both polyfill implementations are correct and well-tested. Poll now
polyfills XNU and BSD quirks re: the hanndling of POLLNVAL and the other
similar status flags. This change resolves a misunderstanding concerning
how select(exceptfds) is intended to map to POLPRI. We now use E2BIG for
bouncing requests that exceed the 64 handle limit on Windows. With pipes
and consoles on Windows our poll impl will now report POLLHUP correctly.

Issues with Windows path generation have been fixed. For example, it was
problematic on Windows to say: posix_spawn_file_actions_addchdir_np("/")
due to the need to un-UNC paths in some additional places. Calling fstat
on UNC style volume path handles will now work. posix_spawn now supports
simulating the opening of /dev/null and other special paths on Windows.

Cosmopolitan no longer defines epoll(). I think wepoll is a nice project
for using epoll() on Windows socket handles. However we need generalized
file descriptor support to make epoll() for Windows work well enough for
inclusion in a C library. It's also not worth having epoll() if we can't
get it to work on XNU and BSD OSes which provide different abstractions.
Even epoll() on Linux isn't that great of an abstraction since it's full
of footguns. Last time I tried to get it to be useful I had little luck.
Considering how long it took to get poll() and select() to be consistent
across platforms, we really have no business claiming to have epoll too.
While it'd be nice to have fully implemented, the only software that use
epoll() are event i/o libraries used by things like nodejs. Event i/o is
not the best paradigm for handling i/o; threads make so much more sense.
2024-09-02 00:29:52 -07:00
..
BUILD.mk Fix NT accept/connect not initializing with SO_UPDATE_*_CONTEXT (#1164) 2024-05-17 02:45:30 -07:00
connect_test.c Fix getpeername() bug on Windows 2024-08-25 11:28:53 -07:00
getpeername_test.c Fix NT accept/connect not initializing with SO_UPDATE_*_CONTEXT (#1164) 2024-05-17 02:45:30 -07:00
inet_ntoa_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
inet_ntop_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
inet_pton_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
nonblock_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
recvfrom_test.c recvfrom: don't convert address if addrsize is 0 (#1153) 2024-05-03 08:03:57 -07:00
sendfile_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
sendrecvmsg_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
setsockopt_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
socket_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
socketpair_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
unix_test.c Drop support for Windows 8 2024-05-29 19:37:47 -07:00