mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Put more thought into i/o polyfills
wait4() is now solid enough to run `make -j100` on Windows. You can now use MSG_DONTWAIT on Windows. There was a handle leak in accept() that's been fixed. Our WIN32 overlapped i/o code has been simplified. Priority class now inherits into subprocesses, so the verynice command will work and the signal mask will now be inherited by execve() and posix_spawn()
This commit is contained in:
parent
736fdb757a
commit
e961385e55
52 changed files with 679 additions and 487 deletions
|
@ -34,15 +34,15 @@
|
|||
/**
|
||||
* Receives data from network.
|
||||
*
|
||||
* This function blocks unless MSG_DONTWAIT is passed. In that case, the
|
||||
* non-error EWOULDBLOCK might be returned. It basically means we didn't
|
||||
* wait around to learn an amount of bytes were written that we know in
|
||||
* advance are guaranteed to be atomic.
|
||||
*
|
||||
* @param fd is the file descriptor returned by socket()
|
||||
* @param buf is where received network data gets copied
|
||||
* @param size is the byte capacity of buf
|
||||
* @param flags is a bitmask which may contain any of the following:
|
||||
* - `MSG_DONTWAIT` to force `O_NONBLOCK` behavior for this call
|
||||
* - `MSG_OOB` is broadly supported (untested by cosmo)
|
||||
* - `MSG_PEEK` is broadly supported (untested by cosmo)
|
||||
* - `MSG_WAITALL` is broadly supported (untested by cosmo)
|
||||
* - `MSG_DONTROUTE` is broadly supported (untested by cosmo)
|
||||
* @param flags can have `MSG_OOB`, `MSG_PEEK`, and `MSG_DONTWAIT`
|
||||
* @param opt_out_srcaddr receives the binary ip:port of the data's origin
|
||||
* @param opt_inout_srcaddrsize is srcaddr capacity which gets updated
|
||||
* @return number of bytes received, 0 on remote close, or -1 w/ errno
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue