mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +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
|
@ -32,15 +32,20 @@
|
|||
* - `POSIX_SPAWN_SETSCHEDPARAM`
|
||||
* - `POSIX_SPAWN_SETSCHEDULER`
|
||||
* - `POSIX_SPAWN_SETSID`
|
||||
* - `POSIX_SPAWN_SETRLIMIT`
|
||||
* @return 0 on success, or errno on error
|
||||
* @raise EINVAL if `flags` has invalid bits
|
||||
*/
|
||||
int posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags) {
|
||||
if (flags &
|
||||
~(POSIX_SPAWN_USEVFORK | POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |
|
||||
POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK |
|
||||
POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER |
|
||||
POSIX_SPAWN_SETSID | POSIX_SPAWN_SETRLIMIT)) {
|
||||
if (flags & ~(POSIX_SPAWN_USEVFORK | //
|
||||
POSIX_SPAWN_RESETIDS | //
|
||||
POSIX_SPAWN_SETPGROUP | //
|
||||
POSIX_SPAWN_SETSIGDEF | //
|
||||
POSIX_SPAWN_SETSIGMASK | //
|
||||
POSIX_SPAWN_SETSCHEDPARAM | //
|
||||
POSIX_SPAWN_SETSCHEDULER | //
|
||||
POSIX_SPAWN_SETSID | //
|
||||
POSIX_SPAWN_SETRLIMIT)) {
|
||||
return EINVAL;
|
||||
}
|
||||
(*attr)->flags = flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue