From ec9f67cff5eac2e3a15d997ccb67b459f77f5427 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sun, 12 Feb 2017 10:11:56 +0100 Subject: setlinebuf stdout --- tailburst.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.1-2-g3f67