Fix ctrl-c in redbean on Windows

This commit is contained in:
Justine Tunney 2023-10-13 07:43:47 -07:00
parent d458642790
commit 4bcb107cb0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
12 changed files with 326 additions and 32 deletions

View file

@ -157,9 +157,6 @@ void *Worker(void *id) {
// wait for next http message (non-fragmented required)
unassert(!pthread_setcancelstate(PTHREAD_CANCEL_MASKED, 0));
got = read(client, inbuf, sizeof(inbuf));
for (int i = 0; i < got; ++i) {
if (!inbuf[i]) inbuf[i] = 1;
}
unassert(!pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, 0));
if (got <= 0) {
if (!got) {