Polish recent changes and make improvements

- Simulate SIGPIPE on Windows NT
- Fix commandv() regression on Windows NT
- Fix sigprocmask() strace bug on OpenBSD
- Add many more system calls to --strace logging
- Make errno state more pristine in redbean strace
This commit is contained in:
Justine Tunney 2022-03-19 03:37:00 -07:00
parent 10a766ebd0
commit 39688a73e4
69 changed files with 460 additions and 1976 deletions

View file

@ -56,9 +56,9 @@ textstartup int __fflush_register(FILE *f) {
struct StdioFlush *sf;
sf = &__fflush;
if (!sf->handles.p) {
sf->handles.p = &sf->handles_initmem[0];
sf->handles.p = sf->handles_initmem;
pushmov(&sf->handles.n, ARRAYLEN(sf->handles_initmem));
__cxa_atexit(fflush, NULL, NULL);
__cxa_atexit(fflush, 0, 0);
}
for (i = sf->handles.i; i; --i) {
if (!sf->handles.p[i - 1]) {
@ -76,7 +76,7 @@ void __fflush_unregister(FILE *f) {
sf = pushpop(sf);
for (i = sf->handles.i; i; --i) {
if (sf->handles.p[i - 1] == f) {
pushmov(&sf->handles.p[i - 1], NULL);
pushmov(&sf->handles.p[i - 1], 0);
return;
}
}