From 5d9660e06175ce3e05972cbd95e4cea02d68b462 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 25 Mar 2022 01:32:37 +0000 Subject: [PATCH] multiprogress.c: Set the terminal stream to be fully buffered. The `free_render_state' function correctly forces output when we're done. --- multiprogress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/multiprogress.c b/multiprogress.c index 450f7f1..0088932 100644 --- a/multiprogress.c +++ b/multiprogress.c @@ -136,6 +136,7 @@ int progress_init(struct progress_state *progress) { fclose(tty->fp); tty->fp = 0; return (-1); } if (!tty->cap.af || !tty->cap.ab || !tty->cap.op) tty->cap.op = 0; if (!tty->cap.me) tty->cap.mr = tty->cap.md = 0; + setvbuf(tty->fp, 0, _IOFBF, BUFSIZ); return (0); } -- 2.11.0