cosmopolitan/test/libc/stdio
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 bugs in poll(), select(), ppoll(), and pselect() 2024-09-02 00:29:52 -07:00
crypt_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
devrand_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
dirstream_test.c Delete ASAN 2024-06-22 05:45:49 -07:00
dtoa_test.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
dumphexc_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
ecvt_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
fds_torture_test.c Apply clang-format update to repo () 2024-04-25 10:38:00 -07:00
fgetln_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
fgets_test.c Apply clang-format update to repo () 2024-04-25 10:38:00 -07:00
fgetwc_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
fmemopen_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
fmt_test.c Support printf %n directive 2024-07-28 22:27:06 -07:00
fprintf_test.c Apply clang-format update to repo () 2024-04-25 10:38:00 -07:00
fputc_test.c Make fread() more consistent with glibc 2024-08-17 02:57:22 -07:00
fputs_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
fread_test.c Make fread() more consistent with glibc 2024-08-17 02:57:22 -07:00
freopen_test.c Fix fread() with 2gb+ sizes 2024-05-24 19:28:23 -07:00
fscanf_test.c *scanf() fixes to make TeX work () 2024-02-23 07:15:30 -08:00
fseeko_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
ftell_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
fwrite_test.c Implement proper time zone support 2024-05-04 23:06:37 -07:00
getdelim_test.c Apply clang-format update to repo () 2024-04-25 10:38:00 -07:00
getentropy_test.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
gz_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
iconv_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
joinstrlist_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
lemur64_test.c Introduce more CTL content 2024-06-27 22:42:32 -07:00
memory_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
mt19937_test.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
palandprintf_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
popen_test.c Improve lock hierarchy 2024-07-24 16:05:48 -07:00
rand_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
rngset_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
snprintf_enomem_test.c Fix printf funcs on memory pressure with floats () 2024-09-01 14:42:14 -07:00
snprintf_test.c Fix printf-family functions on long double inf () 2024-09-01 13:10:48 -07:00
sprintf_s.inc flip et / noet in modelines 2023-12-07 22:17:11 -05:00
sprintf_s_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
sscanf_test.c *scanf() fixes to make TeX work () 2024-02-23 07:15:30 -08:00
tmpfile_test.c Apply clang-format update to repo () 2024-04-25 10:38:00 -07:00
ungetc_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
vappendf_test.c Run clang-format () 2024-06-01 16:30:43 -04:00
zipdir_test.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00