From 0f73434a84cb3105f260749e4b09e6a4f6a3ee19 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 30 Nov 2019 10:37:47 +0100 Subject: Force stdout line buffered on -l --- jawol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jawol.c b/jawol.c index 4fdd83f..e227cac 100644 --- a/jawol.c +++ b/jawol.c @@ -159,6 +159,8 @@ int main(int argc, char **argv) return 1; } if ( dolisten ) { + // Make stdout line buffered, in case this gets piped through something + setvbuf( stdout, NULL, _IOLBF, 500 ); return wolisten( dolisten > 1 ); } if ( gotip && gotif ) { -- cgit v1.2.3-55-g7522