From f741208b7737eab46ef1fcda007798d587f65040 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 18 Jun 2017 20:09:30 -0600 Subject: [PATCH] rktio: another Windows pipe repair --- racket/src/rktio/rktio_fd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/racket/src/rktio/rktio_fd.c b/racket/src/rktio/rktio_fd.c index b2b89f86c0..edb27145ee 100644 --- a/racket/src/rktio/rktio_fd.c +++ b/racket/src/rktio/rktio_fd.c @@ -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 {