rktio: another Windows pipe repair

This commit is contained in:
Matthew Flatt 2017-06-18 20:09:30 -06:00
parent cdf22f7cdd
commit f741208b77

View File

@ -1229,7 +1229,7 @@ intptr_t rktio_write(rktio_t *rktio, rktio_fd_t *rfd, const char *buffer, intptr
if (rfd->oth) {
if (rfd->oth->needflush) {
/* Not flushed, but we haven't promised not to block: */
/* Not flushed, but we haven't promised to make progress: */
flushed = 1;
} else {
WaitForSingleObject(rfd->oth->lock_sema, INFINITE);
@ -1285,6 +1285,9 @@ intptr_t rktio_write(rktio_t *rktio, rktio_fd_t *rfd, const char *buffer, intptr
winwrote = 0;
}
if (ok && winwrote && rfd->oth)
rfd->oth->needflush = 1;
if (ok)
out_len = winwrote;
} else {