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

@ -29,13 +29,10 @@
*/
int __zipos_fstat(const struct ZiposHandle *h, struct stat *st) {
int rc;
if (!st) return efault();
if (!(rc = __zipos_stat_impl(__zipos_get(), h->cfile, st))) {
ZTRACE("__zipos_fstat(%.*s) → %d",
ZIP_CFILE_NAMESIZE(__zipos_get()->map + h->cfile),
ZIP_CFILE_NAME(__zipos_get()->map + h->cfile), st->st_size);
return 0;
if (st) {
rc = __zipos_stat_impl(__zipos_get(), h->cfile, st);
} else {
return rc;
rc = efault();
}
return rc;
}