tfflush stdout after printing on tty mode - spoon - dwm status utility (2f30 fork)
(HTM) git clone git://src.adamsgaard.dk/spoon
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 0cd95a66fd4f86341168740f3402bc07690cbe3f
(DIR) parent f7217172b18eca79e7e16e053edfdd113d0a2851
(HTM) Author: Lucas Gabriel Vuotto <lucas@nanashi.co>
Date: Tue, 22 May 2018 15:54:08 -0300
fflush stdout after printing on tty mode
This allows spoon to work smoothly in tmux status line or when feeding
pipes.
Signed-off-by: Lucas Gabriel Vuotto <lucas@nanashi.co>
Diffstat:
M spoon.c | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
(DIR) diff --git a/spoon.c b/spoon.c
t@@ -91,6 +91,7 @@ ttyloop(void)
for (;;) {
entcat(line, sizeof(line));
puts(line);
+ fflush(stdout);
if (single)
break;
sleep(delay);