diff --git a/libc/intrin/closehandle.greg.c b/libc/intrin/closehandle.greg.c index 17f31261a..dfd278caf 100644 --- a/libc/intrin/closehandle.greg.c +++ b/libc/intrin/closehandle.greg.c @@ -32,10 +32,7 @@ __msabi extern typeof(CloseHandle) *const __imp_CloseHandle; textwindows bool32 CloseHandle(int64_t hObject) { bool32 ok; ok = __imp_CloseHandle(hObject); - if (!ok) { - __winerr(); - if (weaken(__die)) weaken(__die)(); - } + if (!ok) __winerr(); NTTRACE("CloseHandle(%ld) → %hhhd% m", hObject, ok); return ok; } diff --git a/libc/sock/accept4.c b/libc/sock/accept4.c index 92b407f6a..168ca77b7 100644 --- a/libc/sock/accept4.c +++ b/libc/sock/accept4.c @@ -35,6 +35,7 @@ * both the newly created socket and the server one * @return client fd which needs close(), or -1 w/ errno * @asyncsignalsafe + * @restartable (unless SO_RCVTIMEO) */ int accept4(int fd, void *out_addr, uint32_t *inout_addrsize, int flags) { int rc; diff --git a/test/libc/runtime/mprotect_test.c b/test/libc/runtime/mprotect_test.c index 374be08b9..366bb2cbc 100644 --- a/test/libc/runtime/mprotect_test.c +++ b/test/libc/runtime/mprotect_test.c @@ -199,7 +199,7 @@ TEST(mprotect, testFileMap_canChangeToExecWhileOpenInRdwrMode) { TEST(mprotect, testBadProt_failsEinval) { volatile char *p = gc(memalign(PAGESIZE, PAGESIZE)); - EXPECT_EQ(-1, mprotect(p, 0, -1)); + EXPECT_EQ(-1, mprotect(p, 9999, -1)); EXPECT_EQ(EINVAL, errno); } diff --git a/test/tool/build/lib/bsu_test.c b/test/tool/build/lib/bsu_test.c index 8a7593bf3..1e4053527 100644 --- a/test/tool/build/lib/bsu_test.c +++ b/test/tool/build/lib/bsu_test.c @@ -199,6 +199,9 @@ void FixupUndefOpTestFlags(char w, int h, uint64_t x, uint64_t y, if (y != 0 && y != 1) { *flags = SetFlag(*flags, FLAGS_OF, GetFlag(goldenflags, FLAGS_OF)); } + if (y >= w) { + *flags = SetFlag(*flags, FLAGS_CF, GetFlag(goldenflags, FLAGS_CF)); + } } TEST(bsu, test) { diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 8ee14763f..2b33d50bf 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -7093,7 +7093,7 @@ void RedBean(int argc, char *argv[]) { isinitialized = true; CallSimpleHookIfDefined("OnServerStart"); #ifdef STATIC - EventLoop(); + EventLoop(-1, HEARTBEAT); #else if (!IsWindows() && isatty(0)) { ReplEventLoop();