mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Write more tests for signal handling
There's now a much stronger level of assurance that signaling on Windows will be atomic, low-latency, low tail latency, and shall never deadlock.
This commit is contained in:
parent
0e59afb403
commit
dd8c4dbd7d
19 changed files with 407 additions and 75 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "libc/calls/struct/rusage.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/calls/struct/sigset.internal.h"
|
||||
#include "libc/calls/syscall_support-nt.internal.h"
|
||||
#include "libc/cosmo.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/wintime.internal.h"
|
||||
|
@ -169,7 +170,7 @@ static textwindows dontinstrument uint32_t __proc_worker(void *arg) {
|
|||
|
||||
// wait for something to happen
|
||||
if (n == 64) {
|
||||
millis = 5;
|
||||
millis = POLL_INTERVAL_MS;
|
||||
} else {
|
||||
millis = -1u;
|
||||
handles[n++] = __proc.onbirth;
|
||||
|
|
|
@ -167,7 +167,7 @@ static textwindows int __proc_wait(int pid, int *wstatus, int options,
|
|||
}
|
||||
__proc_unlock();
|
||||
if (wi == 1) {
|
||||
// __sig_cancel() woke our semaphore
|
||||
// __sig_wake() woke our semaphore
|
||||
continue;
|
||||
} else {
|
||||
// neither posix or win32 define i/o error conditions for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue