mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58: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
|
@ -115,7 +115,12 @@ static int PosixThread(void *arg, int tid) {
|
|||
}
|
||||
// set long jump handler so pthread_exit can bring control back here
|
||||
if (!setjmp(pt->pt_exiter)) {
|
||||
pthread_sigmask(SIG_SETMASK, &pt->pt_attr.__sigmask, 0);
|
||||
if (IsWindows()) {
|
||||
atomic_store_explicit(&__get_tls()->tib_sigmask, pt->pt_attr.__sigmask,
|
||||
memory_order_release);
|
||||
} else {
|
||||
sys_sigprocmask(SIG_SETMASK, &pt->pt_attr.__sigmask, 0);
|
||||
}
|
||||
rc = pt->pt_start(pt->pt_arg);
|
||||
// ensure pthread_cleanup_pop(), and pthread_exit() popped cleanup
|
||||
unassert(!pt->pt_cleanup);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue