summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2017-02-12 10:11:56 +0100
committerDominique Martinet <asmadeus@codewreck.org>2017-02-12 10:11:56 +0100
commitec9f67cff5eac2e3a15d997ccb67b459f77f5427 (patch)
tree98d24b7ffe1c10b3f9e73464835e42edf0f05305
parent0af382d923b289f2c5256c5dd2527e6a5de3a79e (diff)
setlinebuf stdout
-rw-r--r--tailburst.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tailburst.c b/tailburst.c
index 0021d65..2aaa5a5 100644
--- a/tailburst.c
+++ b/tailburst.c
@@ -92,6 +92,9 @@ int main(int argc, char **argv)
struct getline_states line = { 0 };
char *cur;
+ /* non-buffered output */
+ setlinebuf(stdout);
+
/* make stream non-block */
flags = fcntl(fd, F_GETFL);
flags |= O_NONBLOCK;