cosmopolitan/libc/isystem/sys
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
..
auxv.h Add hwap constants to sys/auxv.h 2024-05-24 11:44:44 -07:00
cdefs.h Changes made for cosmocc builds (#908) 2023-10-09 14:39:02 -07:00
dir.h Add more missing libc functionality 2022-08-06 10:50:51 -07:00
errno.h Add more missing libc functionality 2022-08-06 10:50:51 -07:00
event.h Make more compatibility improvements 2022-09-06 07:04:13 -07:00
fcntl.h Elevate Windows production worthiness 2022-10-13 13:44:41 -07:00
file.h Make more libc improvements 2022-08-06 17:18:40 -07:00
ioctl.h Make improvements 2023-07-11 04:41:50 -07:00
ipc.h Make more libc improvements 2022-08-06 17:18:40 -07:00
mman.h Add more missing libc functionality 2022-08-06 10:50:51 -07:00
mount.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
msg.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
param.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
poll.h Fix bugs in poll(), select(), ppoll(), and pselect() 2024-09-02 00:29:52 -07:00
prctl.h Make more libc improvements 2022-08-06 17:18:40 -07:00
procfs.h Support <isystem> includes in monorepo 2023-11-08 19:14:56 -08:00
ptrace.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
random.h Fold LIBC_RAND into LIBC_STDIO/TINYMATH/INTRIN 2022-08-11 12:32:00 -07:00
reboot.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
resource.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
select.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
sendfile.h Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
signal.h Run clang-format (#1197) 2024-06-01 16:30:43 -04:00
socket.h Changes made for cosmocc builds (#908) 2023-10-09 14:39:02 -07:00
stat.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
statfs.h Make more compatibility improvements 2022-09-06 07:04:13 -07:00
statvfs.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
syscall.h Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
sysinfo.h Improve the cosmocc toolchain 2023-01-05 12:20:52 -08:00
sysmacros.h Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
termios.h Add more missing libc functionality 2022-08-06 10:50:51 -07:00
time.h Implement proper time zone support 2024-05-04 23:06:37 -07:00
times.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
ttydefaults.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
types.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
ucontext.h Simplify cosmocc builds (#863) 2023-07-23 11:11:08 -07:00
uio.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
un.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
user.h Get GNU MPFR and MPC tests to pass 2023-08-21 15:05:10 -07:00
utsname.h Reduce makefile dependencies by 10% 2022-06-08 20:01:28 -07:00
vfs.h Improve cosmocc toolchain 2023-03-05 23:52:49 -08:00
wait.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00