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

@ -19,10 +19,11 @@
#include "libc/bits/safemacros.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/sigbits.h"
#include "libc/calls/strace.internal.h"
#include "libc/calls/struct/stat.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/limits.h"
#include "libc/log/libfatal.internal.h"
#include "libc/macros.internal.h"
#include "libc/mem/alloca.h"
#include "libc/runtime/runtime.h"
@ -84,16 +85,10 @@ struct Zipos *__zipos_get(void) {
zipos.cdir = cdir;
} else {
munmap(map, size);
ZTRACE("__zipos_get(%s) → eocd not found", program_executable_name);
STRACE("__zipos_get(%#s) → eocd not found", program_executable_name);
}
} else {
ZTRACE("__zipos_get(%s) → stat/mmap %s", program_executable_name,
strerror(errno));
}
close(fd);
} else {
ZTRACE("__zipos_get(%s) → open %s", program_executable_name,
strerror(errno));
}
once = true;
sigprocmask(SIG_SETMASK, &old, 0);