From 489637433a8e4382571c55062f39e270600fc26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 4 Jul 2019 00:32:30 +0300 Subject: [PATCH] fflush(stdout) after each line of output for pipes --- ethertype-dump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethertype-dump.c b/ethertype-dump.c index c7966a4..07b0b0f 100644 --- a/ethertype-dump.c +++ b/ethertype-dump.c @@ -118,6 +118,10 @@ int main(int argc, char **argv) { err(1, "printf"); } } + + if (fflush(stdout) == -1) { + err(1, "fflush"); + } } return 0;