mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 00:38:31 +00:00
Add epoll and do more release readiness changes
This change also pays off some of the remaining technical debt with stdio, file descriptors, and memory managemnt polyfills.
This commit is contained in:
parent
a9ea949df8
commit
3e4fd4b0ad
271 changed files with 5706 additions and 1365 deletions
|
@ -32,13 +32,14 @@
|
|||
* @param flags can have SOCK_{CLOEXEC,NONBLOCK}, which may apply to
|
||||
* both the newly created socket and the server one
|
||||
* @return client fd which needs close(), or -1 w/ errno
|
||||
* @asyncsignalsafe
|
||||
*/
|
||||
int accept4(int fd, void *out_addr, uint32_t *inout_addrsize, int flags) {
|
||||
if (!out_addr) return efault();
|
||||
if (!inout_addrsize) return efault();
|
||||
if (!IsWindows()) {
|
||||
return accept4$sysv(fd, out_addr, inout_addrsize, flags);
|
||||
} else if (isfdkind(fd, kFdSocket)) {
|
||||
} else if (__isfdkind(fd, kFdSocket)) {
|
||||
return accept$nt(&g_fds.p[fd], out_addr, inout_addrsize, flags);
|
||||
} else {
|
||||
return ebadf();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue